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

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Related to/duplicate of pr61765.

Note that with the patch at
https://gcc.gnu.org/ml/fortran/2019-01/msg00085.html, the spurious error

pr34500.f90:4:43:

    4 |   character(len=1,kind=c_char) :: test, bar
      |                                           1
    5 | entry bar() bind(C)
      |         2                                  
Error: Procedure 'bar' with binding label 'bar' at (1) uses the same global
identifier as entity at (2)

is replaced with an ICE

Process 2220 launched:
'/opt/gcc/gcc9w/libexec/gcc/x86_64-apple-darwin18.2.0/9.0.0/f951' (x86_64)
 testProcess 2220 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x0)
    frame #0: 0x0000000100106dfc f951`gfc_create_function_decl(gfc_namespace*,
bool) [inlined] contains_struct_check(__g=<unavailable>, __l=<unavailable>,
__f=<unavailable>, __s=<unavailable>, __t=0x0000000000000000) at tree.h:3289
   3286 contains_struct_check (tree __t, const enum tree_node_structure_enum
__s,
   3287                        const char *__f, int __l, const char *__g)
   3288 {
-> 3289   if (tree_contains_struct[TREE_CODE (__t)][__s] != 1)
   3290       tree_contains_struct_check_failed (__t, __s, __f, __l, __g);
   3291   return __t;
   3292 }
Target 0: (f951) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x0)
  * frame #0: 0x0000000100106dfc f951`gfc_create_function_decl(gfc_namespace*,
bool) [inlined] contains_struct_check(__g=<unavailable>, __l=<unavailable>,
__f=<unavailable>, __s=<unavailable>, __t=0x0000000000000000) at tree.h:3289
    frame #1: 0x0000000100106dfc f951`gfc_create_function_decl(gfc_namespace*,
bool)
    frame #2: 0x000000010010f593
f951`gfc_generate_function_code(ns=0x000000014306fa00) at trans-decl.c:6420
    frame #3: 0x0000000100095214 f951`gfc_parse_file() [inlined]
translate_all_program_units(gfc_global_ns_list=<unavailable>) at parse.c:6134
    frame #4: 0x000000010009512a f951`gfc_parse_file()
    frame #5: 0x00000001000dd8ec f951`::gfc_be_parse_file() at f95-lang.c:204
    frame #6: 0x0000000100c71d0a f951`::compile_file() at toplev.c:456
    frame #7: 0x00000001012d9024 f951`toplev::main(int, char**) at
toplev.c:2176
    frame #8: 0x00000001012d8ef0 f951`toplev::main(this=0x00007ffeefbff09e,
argc=<unavailable>, argv=<unavailable>)
    frame #9: 0x00000001012db891 f951`main(argc=2, argv=0x00007ffeefbff0d8) at
main.c:39

Reply via email to