From patchwork Mon Dec 30 17:03:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janus Weil X-Patchwork-Id: 305801 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 599492C00D0 for ; Tue, 31 Dec 2013 04:03:44 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=gdrvO7ZH653qhpbGX+YsnmuS2Hya408juy62QDUxqQLqER phkuCM8cPNIU1j69GzQ1sdV8tlkL3/e7l+uA8Qr+Fgj6cSkSh1GA0eoqzN4QXWOE nkc7WUMilD3J1xst7L/RFIrhxbBdwkY+LkfU2Pscd3PCuckwC37TnO8GzHCkg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=2yd3WamW14ZFtPLMGTihqdQABZs=; b=jhhwydwijwvUUdIlDJ2w F14qMuueNC10a9KO/xkotFFpLN/IsgT5t4Bvtcu1cKIppIG6qPTQsZSCl8M1kPmZ sbqf1qy4ykPyXDd7Oqi8E7QdN8s11B7/RkgcZkoDsN7iAbX2OPXP1EfJrIGwLAi+ ClFdhHbVJv8LtWoNKsvl9eY= Received: (qmail 15330 invoked by alias); 30 Dec 2013 17:03:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 15224 invoked by uid 89); 30 Dec 2013 17:03:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-qc0-f181.google.com Received: from mail-qc0-f181.google.com (HELO mail-qc0-f181.google.com) (209.85.216.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 30 Dec 2013 17:03:33 +0000 Received: by mail-qc0-f181.google.com with SMTP id e9so10920750qcy.26 for ; Mon, 30 Dec 2013 09:03:31 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.49.51.66 with SMTP id i2mr111681679qeo.26.1388423010993; Mon, 30 Dec 2013 09:03:30 -0800 (PST) Received: by 10.96.156.38 with HTTP; Mon, 30 Dec 2013 09:03:30 -0800 (PST) Date: Mon, 30 Dec 2013 18:03:30 +0100 Message-ID: Subject: [Patch, Fortran] PR 58998: [4.8/4.9 Regression] Generic interface problem with gfortran From: Janus Weil To: gfortran , gcc-patches Hi all, since the number of regressions unfortunately keeps on rising since quite some time, I think it would be a suitable new-year's resolution for the whole gfortran team to try and get the number of those buggers closer to zero again ;) I even volunteer to make a start with the one mentioned in the subject line. The fix is actually easy once you know where to look (which was simplified a lot by Dominique's efforts to identify the blameworthy commit). The rather straightforward one-line patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk and 4.8? Cheers, Janus 2013-12-30 Janus Weil PR fortran/58998 * resolve.c (resolve_symbol): Check that symbol is not only flavorless but also untyped. 2013-12-30 Janus Weil PR fortran/58998 * gfortran.dg/generic_28.f90: New. Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 206231) +++ gcc/fortran/resolve.c (working copy) @@ -12732,7 +12732,8 @@ resolve_symbol (gfc_symbol *sym) if (sym->attr.flavor == FL_UNKNOWN || (sym->attr.flavor == FL_PROCEDURE && !sym->attr.intrinsic && !sym->attr.generic && !sym->attr.external - && sym->attr.if_source == IFSRC_UNKNOWN)) + && sym->attr.if_source == IFSRC_UNKNOWN + && sym->ts.type == BT_UNKNOWN)) { /* If we find that a flavorless symbol is an interface in one of the