[Bug fortran/89219] ICE with derived type I/O

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Wed Feb 6 10:06:00 GMT 2019


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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-02-06
                 CC|                            |jvdelisle at gcc dot gnu.org
            Summary|[gfortran 7.3] compiler     |ICE with derived type I/O
                   |throws internal compiler    |
                   |error: segmentation fault   |
     Ever confirmed|0                           |1

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Works for me with FSF 7.3.0 on x86_64-linux.

Did you uncomment the line

    !print*, l%get() ! in this way doesn't work, throws internal compile error

? If I do so, I get with 7.3.0 up to trunk (9.0)

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x37)
    frame #0: 0x00000001001395a8 f951`::transfer_expr(se=0x00007ffeefbfe810,
ts=0x0000000143e16c08, addr_expr=0x0000000143c0bce8, code=0x0000000143e16cd0,
vptr=<unavailable>) at trans-io.c:2438
   2435                    && !(ts->u.derived->attr.sequence
   2436                         || ts->u.derived->attr.is_bind_c))
   2437                   || (ts->type == BT_CLASS
-> 2438                       && !GFC_CLASS_TYPE_P (TREE_TYPE (decl))))
   2439                 gfc_conv_derived_to_class (se, code->expr1,
   2440                                            dtio_sub->formal->sym->ts,
   2441                                            vptr, false, false);
Target 0: (f951) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x37)
  * frame #0: 0x00000001001395a8 f951`::transfer_expr(se=0x00007ffeefbfe810,
ts=0x0000000143e16c08, addr_expr=0x0000000143c0bce8, code=0x0000000143e16cd0,
vptr=<unavailable>) at trans-io.c:2438
    frame #1: 0x000000010013c8a1 f951`gfc_trans_transfer(code=<unavailable>) at
trans-io.c:2663
    frame #2: 0x00000001000dffec f951`::trans_code(code=0x0000000143e16cd0,
cond=0x0000000143df12f8) at trans.c:2038
    frame #3: 0x000000010013a2d8 f951`::build_dt(function=0x0000000143dcb600,
code=0x0000000143e16f40) at trans-io.c:2026
    frame #4: 0x00000001000e000c f951`::trans_code(code=0x0000000143e16f40,
cond=0x0000000000000000) at trans.c:2010
    frame #5: 0x0000000100107b41
f951`gfc_generate_function_code(ns=<unavailable>) at trans-decl.c:6527
    frame #6: 0x0000000100094f24 f951`gfc_parse_file() [inlined]
translate_all_program_units(gfc_global_ns_list=<unavailable>) at parse.c:6134
    frame #7: 0x0000000100094e3a f951`gfc_parse_file()
    frame #8: 0x00000001000dd157 f951`::gfc_be_parse_file() at f95-lang.c:204
    frame #9: 0x0000000100b51b2a f951`::compile_file() at toplev.c:456
    frame #10: 0x0000000100f64014 f951`toplev::main(int, char**) at
toplev.c:2176
    frame #11: 0x0000000100f63ee0 f951`toplev::main(this=0x00007ffeefbff0fe,
argc=<unavailable>, argv=<unavailable>)
    frame #12: 0x0000000100f66881 f951`main(argc=2, argv=0x00007ffeefbff130) at
main.c:39
    frame #13: 0x00007fff63ab6ed9 libdyld.dylib`start + 1


More information about the Gcc-bugs mailing list