https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103613
Bug ID: 103613
Summary: microblaze: ICE in reload pass when building PIE
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: siddhesh at gcc dot gnu.org
Target Milestone: ---
This was found when running build-many-glibcs.py for microblazeel-linux-gnu
with this patch[1] (without the hunks that disable this for microblaze) to
build glibc programs as PIE. I'll post clearer steps to reproduce once the
glibc patch is pushed.
microblazeel-glibc-linux-gnu-gcc tstdiomisc.c -c -std=gnu11 -fgnu89-inline -g
-O2 -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math
-fno-stack-protector -fno-common -Wstrict-prototypes -Wold-style-definition
-fmath-errno -fpie -I../include
-Ibuild-many-3/build/glibcs/microblazeel-linux-gnu/glibc/stdio-common
-Ibuild-many-3/build/glibcs/microblazeel-linux-gnu/glibc
-I../sysdeps/unix/sysv/linux/microblaze/le
-I../sysdeps/unix/sysv/linux/microblaze -I../sysdeps/microblaze/nptl
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux
-I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/microblaze/le -I../sysdeps/microblaze
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/soft-fp
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754
-I../sysdeps/generic -I.. -I../libio -I. -D_LIBC_REENTRANT -include
build-many-3/build/glibcs/microblazeel-linux-gnu/glibc/libc-modules.h
-DMODULE_NAME=testsuite -include ../include/libc-symbols.h -DPIC
-DTOP_NAMESPACE=glibc -D_IO_MTSAFE_IO -o bu
ild-many-3/build/glibcs/microblazeel-linux-gnu/glibc/stdio-common/tstdiomisc.o
-MD -MP -MF
build-many-3/build/glibcs/microblazeel-linux-gnu/glibc/stdio-common/tstdiomisc.o.dt
-MT
build-many-3/build/glibcs/microblazeel-linux-gnu/glibc/stdio-common/tstdiomisc.o
during RTL pass: reload
tstdiomisc.c: In function ‘main’:
tstdiomisc.c:289:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1168
289 | }
| ^
0x55e2c5 gen_reg_rtx(machine_mode)
build-many-3/src/gcc/gcc/emit-rtl.c:1168
0x7a0696 force_reg(machine_mode, rtx_def*)
build-many-3/src/gcc/gcc/explow.c:687
0xfcf7f0 gen_movdf(rtx_def*, rtx_def*)
build-many-3/src/gcc/gcc/config/microblaze/microblaze.md:1226
0x7c0f77 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
build-many-3/src/gcc/gcc/recog.h:407
0x7c0f77 emit_move_insn_1(rtx_def*, rtx_def*)
build-many-3/src/gcc/gcc/expr.c:3766
0x7c7c1c gen_move_insn(rtx_def*, rtx_def*)
build-many-3/src/gcc/gcc/expr.c:3956
0xa3eeaa gen_reload
build-many-3/src/gcc/gcc/reload1.c:8617
0xa46e21 emit_input_reload_insns
build-many-3/src/gcc/gcc/reload1.c:7530
0xa46e21 do_input_reload
build-many-3/src/gcc/gcc/reload1.c:7817
0xa46e21 emit_reload_insns
build-many-3/src/gcc/gcc/reload1.c:8005
0xa46e21 reload_as_needed
build-many-3/src/gcc/gcc/reload1.c:4546
0xa4a953 reload(rtx_insn*, int)
build-many-3/src/gcc/gcc/reload1.c:1047
0x8fe433 do_reload
build-many-3/src/gcc/gcc/ira.c:5847
0x8fe433 execute
build-many-3/src/gcc/gcc/ira.c:6021
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.
[1]
https://patchwork.sourceware.org/project/glibc/patch/[email protected]/