https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77632

--- Comment #3 from kargl at gcc dot gnu.org ---
(In reply to kargl from comment #2)
> Ugh.  Looked at this briefly.  AFAIK, the following is legal code:
> 
> program foo
>    implicit none
>    real, target :: a
>    real, pointer :: b => a
>    if (associated(b, a) .eqv. .false.) stop 2
> end program foo
> 
> This produces the wonderfully bad result:
> 
> troutmask:sgk[296] gfcx -c a.f90
> f951: internal compiler error: in get, at cgraph.h:424
> 0x714635 symtab_node::get(tree_node const*)
>         ../../gccx/gcc/cgraph.h:424
> 0x714635 varpool_node::get(tree_node const*)
>         ../../gccx/gcc/cgraph.h:2617
> 0x714635 varpool_node::get_create(tree_node*)
>         ../../gccx/gcc/varpool.c:146
> 0x9c4667 record_reference
>         ../../gccx/gcc/cgraphbuild.c:82
> 0x9c4667 record_reference
>         ../../gccx/gcc/cgraphbuild.c:48
> 0x10bebd5 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
> void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
> tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
> void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
>         ../../gccx/gcc/tree.c:12151
> 0x9c4e95 record_references_in_initializer(tree_node*, bool)
>         ../../gccx/gcc/cgraphbuild.c:386
> 0x10fda2f varpool_node::analyze()
>         ../../gccx/gcc/varpool.c:528
> 0x9cabff analyze_functions
>         ../../gccx/gcc/cgraphunit.c:1180
> 0x9cbc63 symbol_table::finalize_compilation_unit()
>         ../../gccx/gcc/cgraphunit.c:2833
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.

I have a patch that fixes this issue.

Reply via email to