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

--- Comment #2 from airplanemath <airplanemath at aol dot com> ---
Running gfortran with "-wrapper gdb,--args" notes the segfault with:
---
Thread 1 "f951" received signal SIGSEGV, Segmentation fault.
0x00000001004fcf20 in build_common_decl (is_init=false, union_type=<optimized
out>, com=0x60013e1f0) at
/usr/src/debug/gcc-7.4.0-1/gcc/fortran/trans-common.c:463
463           attributes = gfc_add_attributes_to_decl (com->head->attr,
NULL_TREE);
---
Running "bt full" produces
---
#0  0x00000001004fcf20 in build_common_decl (is_init=false,
union_type=<optimized out>, com=0x60013e1f0) at
/usr/src/debug/gcc-7.4.0-1/gcc/fortran/trans-common.c:463
        attributes = <optimized out>
        decl = 0x6fffff00ab0
        identifier = 0x6ffffbd4a60
        decl = <optimized out>
        identifier = <optimized out>
        size = <optimized out>
        attributes = <optimized out>
        field = <optimized out>
#1  create_common (com=com@entry=0x60013e1f0, head=<optimized out>,
saw_equiv=saw_equiv@entry=true) at
/usr/src/debug/gcc-7.4.0-1/gcc/fortran/trans-common.c:672
        s = <optimized out>
        next_s = <optimized out>
        union_type = <optimized out>
        field_link = <optimized out>
        field = <optimized out>
        field_init = <optimized out>
        rli = <optimized out>
        decl = <optimized out>
        is_init = <optimized out>
        is_saved = <optimized out>
        __FUNCTION__ = "create_common"
#2  0x00000001004fd800 in finish_equivalences (ns=0x600128a00) at
/usr/src/debug/gcc-7.4.0-1/gcc/fortran/trans-common.c:1270
        y = <optimized out>
        sym = <optimized out>
        c = 0x60013e1f0
        align = 4
        z = 0x60013d510
        offset = <optimized out>
        dummy = true
        z = <optimized out>
        y = <optimized out>
        sym = <optimized out>
        c = <optimized out>
        offset = <optimized out>
        align = <optimized out>
        dummy = <optimized out>
#3  gfc_trans_common (ns=ns@entry=0x600128a00) at
/usr/src/debug/gcc-7.4.0-1/gcc/fortran/trans-common.c:1307
        c = <optimized out>
#4  0x000000010050c3a0 in gfc_generate_module_vars (ns=ns@entry=0x600128a00) at
/usr/src/debug/gcc-7.4.0-1/gcc/fortran/trans-decl.c:5287
        __FUNCTION__ = "gfc_generate_module_vars"
#5  0x00000001004e6adf in gfc_generate_module_code (ns=0x600128a00) at
/usr/src/debug/gcc-7.4.0-1/gcc/fortran/trans.c:2176
        n = <optimized out>
        entry = 0x6fffff49780
        __FUNCTION__ = "gfc_generate_module_code"
#6  0x00000001004982c2 in translate_all_program_units
(gfc_global_ns_list=<optimized out>) at
/usr/src/debug/gcc-7.4.0-1/gcc/fortran/parse.c:6062
        errors = 0
        errors = <optimized out>
        ns = <optimized out>
#7  gfc_parse_file () at /usr/src/debug/gcc-7.4.0-1/gcc/fortran/parse.c:6275
        seen_program = <optimized out>
        errors_before = 0
        errors = 0
        top = {state = COMP_NONE, sym = 0x0, do_variable = 0x0, construct =
0x0, head = 0x0, tail = 0x0, previous = 0x0, ext = {end_do_label = 0xffffcb94,
oacc_declare_clauses = 0xffffcb94}}
        s = {state = COMP_MODULE, sym = 0x6001293b0, do_variable = 0x0,
construct = 0x0, head = 0x0, tail = 0x0, previous = 0xffffc7b0, ext =
{end_do_label = 0x0, oacc_declare_clauses = 0x0}}
        st = <optimized out>
        prog_locus = {nextc = 0xffffca46, lb = 0xffffcb94}
        next = <optimized out>
#8  0x00000001004df32b in gfc_be_parse_file () at
/usr/src/debug/gcc-7.4.0-1/gcc/fortran/f95-lang.c:204
No locals.
#9  0x00000001008fd8ac in compile_file () at
/usr/src/debug/gcc-7.4.0-1/gcc/toplev.c:467
No locals.
#10 0x00000001010e7b8d in do_compile () at
/usr/src/debug/gcc-7.4.0-1/gcc/toplev.c:2003
        i = 1
#11 toplev::main (this=this@entry=0xffffca46, argc=<optimized out>,
argc@entry=17, argv=<optimized out>, argv@entry=0xffffcac0) at
/usr/src/debug/gcc-7.4.0-1/gcc/toplev.c:2138
        __FUNCTION__ = "main"
#12 0x0000000101107545 in main (argc=17, argv=0xffffcac0) at
/usr/src/debug/gcc-7.4.0-1/gcc/main.c:39
        toplev = {m_use_TV_TOTAL = true, m_init_signals = true}
---
I also ran "info locals", which printed:
toplev = {m_use_TV_TOTAL = true, m_init_signals = true}

What other information would help narrow this down? I've exhausted my current
knowledge of gcc and gdb.

Reply via email to