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

--- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
With a clean tree at r11-7872 I get

(lldb) b misc.c:309
Breakpoint 1: where = f951`gfc_code2string(mstring const*, int) + 26 at
misc.c:309:22, address = 0x000000010008457a
(lldb) run pr96013.f90
Process 14637 launched:
'/opt/gcc/gcc11a/libexec/gcc/x86_64-apple-darwin20.3.0/11.0.1/f951' (x86_64)
Process 14637 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x000000010008457a f951`gfc_code2string(m=0x00000001019c00e0,
code=15) at misc.c:309:22
   306        m++;
   307      }
   308  
-> 309    gfc_internal_error ("gfc_code2string(): Bad code");
   310    /* Not reached */
   311  }
   312  
Target 0: (f951) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x000000010008457a f951`gfc_code2string(m=0x00000001019c00e0,
code=15) at misc.c:309:22
    frame #1: 0x000000010008810c f951`::mio_name(int, const mstring *)
[inlined] mio_name(m=0x00000001019bffc0, t=15) at module.c:1800:44
    frame #2: 0x0000000100088102 f951`::mio_name(t=15, m=0x00000001019bffc0)
    frame #3: 0x000000010008816f
f951`::mio_symbol_attribute(attr=0x0000000142a06520) at module.c:2221:1
    frame #4: 0x000000010008d633 f951`::mio_symbol(sym=0x0000000142a064d0) at
module.c:4550:24
    frame #5: 0x000000010008db98 f951`::write_symbol(n=<unavailable>,
sym=0x0000000142a064d0) at module.c:5914:14
    frame #6: 0x000000010008dc42
f951`::write_symbol1_recursion(sp=<unavailable>) at module.c:6117:16
    frame #7: 0x0000000100091baa f951`::dump_module(const char *, int) at
module.c:6150:27
    frame #8: 0x0000000100091b7c f951`::dump_module(const char *, int)
    frame #9: 0x0000000100091b7c f951`::dump_module(name=<unavailable>,
dump_flag=<unavailable>)
    frame #10: 0x0000000100092229 f951`gfc_dump_module(name="m", dump_flag=1)
at module.c:6483:15
    frame #11: 0x00000001000b2eec f951`gfc_parse_file() at parse.c:6506:23
    frame #12: 0x000000010010d987 f951`::gfc_be_parse_file() at
f95-lang.c:212:18
    frame #13: 0x0000000100d1a294 f951`::compile_file() at toplev.c:457:25
    frame #14: 0x000000010120dd9f f951`toplev::main(int, char**) at
toplev.c:2201:24
    frame #15: 0x000000010120da5e f951`toplev::main(this=0x00007ffeefbff09e,
argc=<unavailable>, argv=<unavailable>)
    frame #16: 0x000000010120ffb1 f951`main(argc=2, argv=0x00007ffeefbff0d8) at
main.c:39:22
    frame #17: 0x00007fff2066d621 libdyld.dylib`start + 1
    frame #18: 0x00007fff2066d621 libdyld.dylib`start + 1
(lldb) c
Process 14637 resuming
f951: internal compiler error: gfc_code2string(): Bad code

I get the same with the patch in comment 6.

Reply via email to