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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
ubsan build helps:

$ UBSAN_OPTIONS=print_stacktrace=1  ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/real_do_1.f90
-frounding-math
/home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/real_do_1.f90:13:5:

13 |   do x = 1.0, 2.05, 0.1
   |     1
Warning: Deleted feature: Loop variable at (1) must be integer
/home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/real_do_1.f90:13:8:

13 |   do x = 1.0, 2.05, 0.1
   |        1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
/home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/real_do_1.f90:13:13:

13 |   do x = 1.0, 2.05, 0.1
   |             1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
/home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/real_do_1.f90:13:19:

13 |   do x = 1.0, 2.05, 0.1
   |                   1
Warning: Deleted feature: Step expression in DO loop at (1) must be integer
/home/marxin/Programming/gcc/gcc/function.c:2046:22: runtime error: member
access within null pointer of type 'const union tree_node'
    #0 0x15140fc in aggregate_value_p(tree_node const*, tree_node const*)
/home/marxin/Programming/gcc/gcc/function.c:2046
    #1 0xf3d2df in emit_library_call_value_1(int, rtx_def*, rtx_def*,
libcall_type, machine_mode, int, std::pair<rtx_def*, machine_mode>*)
/home/marxin/Programming/gcc/gcc/calls.c:4745
    #2 0x136c556 in emit_library_call_value(rtx_def*, rtx_def*, libcall_type,
machine_mode, rtx_def*, machine_mode)
/home/marxin/Programming/gcc/gcc/rtl.h:4185
    #3 0x13b3a79 in convert_mode_scalar
/home/marxin/Programming/gcc/gcc/expr.c:329
    #4 0x13b2da3 in convert_move(rtx_def*, rtx_def*, int)
/home/marxin/Programming/gcc/gcc/expr.c:271
    #5 0x13ba344 in convert_modes(machine_mode, machine_mode, rtx_def*, int)
/home/marxin/Programming/gcc/gcc/expr.c:712
    #6 0x13b86da in convert_to_mode(machine_mode, rtx_def*, int)
/home/marxin/Programming/gcc/gcc/expr.c:637
    #7 0x1c27737 in expand_fix(rtx_def*, rtx_def*, int)
/home/marxin/Programming/gcc/gcc/optabs.c:4930
    #8 0x1405267 in expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier) /home/marxin/Programming/gcc/gcc/expr.c:8961
    #9 0xf8e552 in expand_gimple_stmt_1
/home/marxin/Programming/gcc/gcc/cfgexpand.c:3673
    #10 0xf8ea99 in expand_gimple_stmt
/home/marxin/Programming/gcc/gcc/cfgexpand.c:3734
    #11 0xfa3f58 in expand_gimple_basic_block
/home/marxin/Programming/gcc/gcc/cfgexpand.c:5770
    #12 0xfa88da in execute /home/marxin/Programming/gcc/gcc/cfgexpand.c:6373
    #13 0x1d1578c in execute_one_pass(opt_pass*)
/home/marxin/Programming/gcc/gcc/passes.c:2446
    #14 0x1d1611d in execute_pass_list_1
/home/marxin/Programming/gcc/gcc/passes.c:2535
    #15 0x1d16271 in execute_pass_list(function*, opt_pass*)
/home/marxin/Programming/gcc/gcc/passes.c:2546
    #16 0x10a13e2 in cgraph_node::expand()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2121
    #17 0x10a3a15 in output_in_order
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2365
    #18 0x10a5433 in symbol_table::compile()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2609
    #19 0x10a5ea6 in symbol_table::finalize_compilation_unit()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2788
    #20 0x20dd5b5 in compile_file /home/marxin/Programming/gcc/gcc/toplev.c:480
    #21 0x20e4820 in do_compile /home/marxin/Programming/gcc/gcc/toplev.c:2170
    #22 0x20e4e4f in toplev::main(int, char**)
/home/marxin/Programming/gcc/gcc/toplev.c:2305
    #23 0x3aec680 in main /home/marxin/Programming/gcc/gcc/main.c:39
    #24 0x7ffff5ea1fea in __libc_start_main ../csu/libc-start.c:308
    #25 0x812bc9 in _start (/dev/shm/objdir2/gcc/f951+0x812bc9)

during RTL pass: expand
/home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/real_do_1.f90:13:0:

13 |   do x = 1.0, 2.05, 0.1
   | 
internal compiler error: Segmentation fault
0x20dc92f crash_signal
        /home/marxin/Programming/gcc/gcc/toplev.c:325
0x7ffff5eb710f ???
       
/usr/src/debug/glibc-2.27-6.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x15140fd aggregate_value_p(tree_node const*, tree_node const*)
        /home/marxin/Programming/gcc/gcc/function.c:2046
0xf3d2df emit_library_call_value_1(int, rtx_def*, rtx_def*, libcall_type,
machine_mode, int, std::pair<rtx_def*, machine_mode>*)
        /home/marxin/Programming/gcc/gcc/calls.c:4745
0x136c556 emit_library_call_value(rtx_def*, rtx_def*, libcall_type,
machine_mode, rtx_def*, machine_mode)
        /home/marxin/Programming/gcc/gcc/rtl.h:4185
0x13b3a79 convert_mode_scalar
        /home/marxin/Programming/gcc/gcc/expr.c:329
0x13b2da3 convert_move(rtx_def*, rtx_def*, int)
        /home/marxin/Programming/gcc/gcc/expr.c:271
0x13ba344 convert_modes(machine_mode, machine_mode, rtx_def*, int)
        /home/marxin/Programming/gcc/gcc/expr.c:712
0x13b86da convert_to_mode(machine_mode, rtx_def*, int)
        /home/marxin/Programming/gcc/gcc/expr.c:637
0x1c27737 expand_fix(rtx_def*, rtx_def*, int)
        /home/marxin/Programming/gcc/gcc/optabs.c:4930
0x1405267 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /home/marxin/Programming/gcc/gcc/expr.c:8961
0xf8e552 expand_gimple_stmt_1
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:3673
0xf8ea99 expand_gimple_stmt
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:3734
0xfa3f58 expand_gimple_basic_block
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:5770
0xfa88da execute
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:6373
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to