From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17145 invoked by alias); 13 Mar 2014 21:18:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 17125 invoked by uid 89); 13 Mar 2014 21:18:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: smtp23.services.sfr.fr Received: from smtp23.services.sfr.fr (HELO smtp23.services.sfr.fr) (93.17.128.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Mar 2014 21:18:22 +0000 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2318.sfr.fr (SMTP Server) with ESMTP id 03B1870003EF; Thu, 13 Mar 2014 22:18:20 +0100 (CET) Received: from [192.168.0.16] (did75-4-82-66-46-21.fbx.proxad.net [82.66.46.21]) by msfrf2318.sfr.fr (SMTP Server) with ESMTP id 970FF70002B3; Thu, 13 Mar 2014 22:18:19 +0100 (CET) X-SFR-UUID: 20140313211819618.970FF70002B3@msfrf2318.sfr.fr Message-ID: <5322208C.1010002@sfr.fr> Date: Thu, 13 Mar 2014 21:24:00 -0000 From: Mikael Morin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: jimmie.davis@l-3com.com, gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: Re: patch fortran, pr 59746, internal compiler error : segmentation fault References: ,<531CA574.2050900@sfr.fr> ,<531CD1A3.6070303@sfr.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00698.txt.bz2 Hello, Le 10/03/2014 03:15, jimmie.davis@l-3com.com a écrit : > Index: gcc/gcc/fortran/symbol.c > =================================================================== > --- gcc/gcc/fortran/symbol.c (revision 208437) > +++ gcc/gcc/fortran/symbol.c (working copy) > @@ -3069,56 +3069,56 @@ > > FOR_EACH_VEC_ELT (latest_undo_chgset->syms, i, p) > { > - if (p->gfc_new) > + /* Symbol was new. Or was old and just put in common. */ Now the comment needs updating as "just put in common" also applies to the "new" case. Or you can also remove it ("just put in common" is somewhat redundant with the other comment anyway). > + if ( p->attr.in_common && p->common_block && p->common_block->head > + && (p->gfc_new || !p->old_symbol->attr.in_common)) > { > - /* Symbol was new. */ > - if (p->attr.in_common && p->common_block && p->common_block->head) > - { > - /* If the symbol was added to any common block, it > - needs to be removed to stop the resolver looking > - for a (possibly) dead symbol. */ > + /* If the symbol was added to any common block, it > + needs to be removed to stop the resolver looking > + for a (possibly) dead symbol. */ "needs" should be aligned with "If" like it was before; same for "for". Now we are in pretty good shape. The ICE happens with invalid code after reporting an error, correct? Then I agree, this should rather wait for stage 1. Thanks Mikael