https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92379
Bug ID: 92379
Summary: rs6000.c:5598:13: runtime error: shift exponent 64 is
too large for 64-bit type 'long int'
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
Target Milestone: ---
Host: powerpc64-unknown-linux-gnu
Target: powerpc64-unknown-linux-gnu
Build: powerpc64-unknown-linux-gnu
Using latest GCC master I see following UBSAN error:
$ export UBSAN_OPTIONS="print_stacktrace=1"
$ make all-host -k CFLAGS="-O0 -g -fsanitize=undefined -ldl" CXXFLAGS="-O0 -g
-fsanitize=undefined" LDFLAGS="-fsanitize=undefined -ldl"
$ ./xgcc -B./ -B/home/marxin/bin/gcc/powerpc64le-unknown-linux-gnu/bin/
-isystem /home/marxin/bin/gcc/powerpc64le-unknown-linux-gnu/include -isystem
/home/marxin/bin/gcc/powerpc64le-unknown-linux-gnu/sys-include
-L/home/marxin/Programming/gcc/objdir/gcc/../ld -xc -nostdinc /dev/null -S -o
/dev/null -fself-test=../../gcc/testsuite/selftests
../../gcc/config/rs6000/rs6000.c:5598:13: runtime error: shift exponent 64 is
too large for 64-bit type 'long int'
#0 0x13299f48 in num_insns_constant_multi
../../gcc/config/rs6000/rs6000.c:5598
#1 0x1329bc44 in num_insns_constant(rtx_def*, machine_mode)
../../gcc/config/rs6000/rs6000.c:5686
#2 0x132ce1d4 in rs6000_emit_move(rtx_def*, rtx_def*, machine_mode)
../../gcc/config/rs6000/rs6000.c:9889
#3 0x13c07e6c in gen_movdi(rtx_def*, rtx_def*)
../../gcc/config/rs6000/rs6000.md:7171
#4 0x110da4d4 in insn_gen_fn::operator()(rtx_def*, rtx_def*) const
../../gcc/recog.h:318
#5 0x1106eaac in emit_move_insn_1(rtx_def*, rtx_def*) ../../gcc/expr.c:3727
#6 0x11070318 in emit_move_insn(rtx_def*, rtx_def*) ../../gcc/expr.c:3823
#7 0x1104078c in convert_move(rtx_def*, rtx_def*, int) ../../gcc/expr.c:247
#8 0x11082cc0 in store_expr(tree_node*, rtx_def*, int, bool, bool)
../../gcc/expr.c:5656
#9 0x1107fa40 in expand_assignment(tree_node*, tree_node*, bool)
../../gcc/expr.c:5482
#10 0x10a6cea4 in expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3777
#11 0x10a6d934 in expand_gimple_stmt ../../gcc/cfgexpand.c:3875
#12 0x10a86d94 in expand_gimple_basic_block ../../gcc/cfgexpand.c:5914
#13 0x10a8d504 in execute ../../gcc/cfgexpand.c:6554
#14 0x144d2b5c in test_expansion_to_rtl ../../gcc/function-tests.c:609
#15 0x144d3818 in selftest::function_tests_c_tests()
../../gcc/function-tests.c:691
#16 0x149690bc in selftest::run_tests() ../../gcc/selftest-run-tests.c:102
#17 0x123602c8 in toplev::run_self_tests() ../../gcc/toplev.c:2240
#18 0x12360924 in toplev::main(int, char**) ../../gcc/toplev.c:2318
#19 0x14ad4d8c in main ../../gcc/main.c:39
#20 0x3fff8fbd50fc in generic_start_main.isra.0 (/lib64/libc.so.6+0x250fc)