https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88536
--- Comment #7 from Manfred Schwarb <manfred99 at gmx dot ch> ---
Thanks Jakub for the debug hint, and thanks Dominique for finding the
duplicate.
Indeed, my backtrace also points to simplify_ref_chain:

# gdb --quiet `/usr/local/gcc-trunk-32bit/bin/gcc -print-prog-name=f951`
Reading symbols from
/usr/local/gcc-trunk-32bit/libexec/gcc/i686-linux/9.0.0/f951...done.
(gdb) run /tmp/gcc-trunk-source/gcc/gcc/testsuite/gfortran.dg/pr87945_1.f90
Starting program: /usr/local/gcc-trunk-32bit/libexec/gcc/i686-linux/9.0.0/f951
/tmp/gcc-trunk-source/gcc/gcc/testsuite/gfortran.dg/pr87945_1.f90
/tmp/gcc-trunk-source/gcc/gcc/testsuite/gfortran.dg/pr87945_1.f90:5:13:

    5 |    data a%len /1/       ! { dg-error "parameter cannot appear in" }
      |             1
Error: Inquiry parameter cannot appear in a data-stmt-object-list at (1)

Program received signal SIGSEGV, Segmentation fault.
0x083debd5 in simplify_ref_chain(gfc_ref*, int, gfc_expr**) () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
414                   gcc_assert (lo < hi);
(gdb) bt
#0  0x083debd5 in simplify_ref_chain(gfc_ref*, int, gfc_expr**) () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#1  0x083de5bc in gfc_simplify_expr(gfc_expr*, int) () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#2  0x08435f2b in gfc_match_varspec(gfc_expr*, int, bool, bool) () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#3  0x08436719 in match_variable(gfc_expr**, int, int) () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#4  0x083c1fa7 in var_element(gfc_data_variable*) () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#5  0x083c3e98 in gfc_match_data() () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#6  0x08428b4a in match_word () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#7  0x0842a5ea in decode_statement() () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#8  0x0842d0a5 in next_statement() () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#9  0x0842e9ff in parse_spec(gfc_statement) () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#10 0x08430eaa in parse_progunit(gfc_statement) () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#11 0x08432153 in gfc_parse_file() () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#12 0x08479649 in gfc_be_parse_file() () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#13 0x0897ce7d in compile_file() () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#14 0x083a01cf in toplev::main(int, char**) () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414
#15 0x083a3c31 in main () at
../../../gcc-trunk-source/gcc/libgcc/unwind-dw2-fde-dip.c:414

Reply via email to