This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch fortran, pr 59746, internal compiler error : segmentation fault
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: jimmie dot davis at l-3com dot com, gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Thu, 13 Mar 2014 22:18:04 +0100
- Subject: Re: patch fortran, pr 59746, internal compiler error : segmentation fault
- Authentication-results: sourceware.org; auth=none
- References: <FFF95760268D324AB6DD9426E83C8DF70B2E0F21 at ARLEXCHMBX01 dot lst dot link dot l-3com dot com>,<531CA574 dot 2050900 at sfr dot fr> <FFF95760268D324AB6DD9426E83C8DF70B2E0FB9 at ARLEXCHMBX01 dot lst dot link dot l-3com dot com>,<531CD1A3 dot 6070303 at sfr dot fr> <FFF95760268D324AB6DD9426E83C8DF70B2E1227 at ARLEXCHMBX01 dot lst dot link dot l-3com dot com>
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
- References:
- patch fortran, pr 59746, internal compiler error : segmentation fault
- Re: patch fortran, pr 59746, internal compiler error : segmentation fault
- RE: patch fortran, pr 59746, internal compiler error : segmentation fault
- Re: patch fortran, pr 59746, internal compiler error : segmentation fault
- RE: patch fortran, pr 59746, internal compiler error : segmentation fault