https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91289
Bug ID: 91289
Summary: powerpc-eabi: Usage of -fstack-limit-symbol leads to
internal compiler error during RTL pass
Product: gcc
Version: 9.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: philipp.spilger at kip dot uni-heidelberg.de
Target Milestone: ---
Created attachment 46640
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46640&action=edit
Preprocessed source triggering the error
Compilation of
```
int test() { return 0; }
```
with `powerpc-eabi-gcc-9.1.0 -Wall -Wextra -ffreestanding
-fstack-limit-symbol=symbol_name -c test.c`
leads to the internal compiler error:
```
test.c: In function 'test':
test.c:3:1: error: insn does not satisfy its constraints:
3 | }
| ^
(insn 17 16 18 (set (reg:SI 0 0)
(lo_sum:SI (reg:SI 0 0)
(const (plus:SI (symbol_ref:SI ("symbol_name"))
(const_int 16 [0x10]))))) "test.c":1:12 700 {elf_low}
(nil))
during RTL pass: final
test.c:3:1: internal compiler error: in final_scan_insn_1, at final.c:3013
0x5a8c18 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc/gcc/rtl-error.c:108
0x5a8c3e _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/gcc/rtl-error.c:118
0x59c796 final_scan_insn_1
../../gcc/gcc/final.c:3013
0x7cefc8 final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
../../gcc/gcc/final.c:3153
0x7cf28c final_1
../../gcc/gcc/final.c:2021
0x7cfcc4 rest_of_handle_final
../../gcc/gcc/final.c:4659
0x7cfcc4 execute
../../gcc/gcc/final.c:4737
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.
```
The gcc-9.1.0 is built with the following options: (gcc --verbose)
```
Using built-in specs.
COLLECT_GCC=powerpc-eabi-gcc-9.1.0
COLLECT_LTO_WRAPPER=/fasthome/pspilger/gcc/install/libexec/gcc/powerpc-eabi/9.1.0/lto-wrapper
Target: powerpc-eabi
Configured with: ../gcc/configure --prefix=/fasthome/pspilger/gcc/install
--target=powerpc-eabi --enable-languages=c,c++ --disable-shared --enable-lto
--with-float=soft --without-headers --disable-threads --disable-decimal-float
--disable-multilib --disable-nls --disable-libstdcxx --disable-libgomp
--disable-libvtv --disable-libatomic --disable-libmpx --disable-libquadmath
--disable-libssp
Thread model: single
gcc version 9.1.0 (GCC)
```
The problem also occurs with gcc-8.1.0, but does not occur with gcc-4.9.4.