From patchwork Tue Dec 31 10:14:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janus Weil X-Patchwork-Id: 305862 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 623BE2C0086 for ; Tue, 31 Dec 2013 21:14:48 +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=V1+6eANnTtiGa6Ms6k/4aHTwJpcVAiVJeu/D07hYTJ/p2c CeC1sLLMhE19/PdwBl4B+4+9Pe3GUZbzVvev+5uXTd73dVWrdFd4OREXJ1H+y9mg VXovhZ2UDUWf8ZAWqYREiFBHQ0Ist1MV2BOb6hIVl56YKPANHOtG9v+yrnQxM= 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=8rno8UiuVr5Y4RpAWY1UTlIm/pE=; b=UnUEAcud5MkvxI2SM/tb tDApyLXiIrGlmJfuAmtyDxDnciZDULpcimrtjzC8oX82LzUh6dh6VV93N4rkuYpT mKRX+vnj1kFH2YpKHg/z/yEZ2iESmNMoc0E6+vJQF6PXYW00xHIROKE+XdF978FX U1Z/nkWrGa/ALhGyGElTxOY= Received: (qmail 32274 invoked by alias); 31 Dec 2013 10:14:41 -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 32255 invoked by uid 89); 31 Dec 2013 10:14:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-qe0-f52.google.com Received: from mail-qe0-f52.google.com (HELO mail-qe0-f52.google.com) (209.85.128.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 31 Dec 2013 10:14:39 +0000 Received: by mail-qe0-f52.google.com with SMTP id ne12so12067651qeb.25 for ; Tue, 31 Dec 2013 02:14:37 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.229.179.69 with SMTP id bp5mr115862171qcb.17.1388484877261; Tue, 31 Dec 2013 02:14:37 -0800 (PST) Received: by 10.96.156.38 with HTTP; Tue, 31 Dec 2013 02:14:37 -0800 (PST) Date: Tue, 31 Dec 2013 11:14:37 +0100 Message-ID: Subject: [Patch, Fortran] PR 59023: [4.9 regression] ICE in gfc_search_interface with BIND(C) From: Janus Weil To: gfortran , gcc-patches Hi all, ... and the reg-bashing continues: Here is a small patch to fix a bind(c) problem. It essentially prevents 'resolve_global_procedure' to be applied to bind(c) procedures. Regtested on x86_64-unknown-linux-gnu. Ok for trunk? Cheers, Janus 2013-12-31 Janus Weil PR fortran/59023 * resolve.c (resolve_global_procedure): Don't apply to c-binding procedures. (gfc_verify_binding_labels): Remove duplicate line. 2013-12-31 Janus Weil PR fortran/59023 * gfortran.dg/bind_c_procs_2.f90: New. Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 206252) +++ gcc/fortran/resolve.c (working copy) @@ -2351,6 +2351,7 @@ resolve_global_procedure (gfc_symbol *sym, locus * if ((sym->attr.if_source == IFSRC_UNKNOWN || sym->attr.if_source == IFSRC_IFBODY) && gsym->type != GSYM_UNKNOWN + && !gsym->binding_label && gsym->ns && gsym->ns->resolved != -1 && gsym->ns->proc_name @@ -10163,7 +10164,6 @@ gfc_verify_binding_labels (gfc_symbol *sym) gsym->where = sym->declared_at; gsym->sym_name = sym->name; gsym->binding_label = sym->binding_label; - gsym->binding_label = sym->binding_label; gsym->ns = sym->ns; gsym->mod_name = module; if (sym->attr.function)