[Bug c/104894] New: [ppc64le] gcc11 ICE with -fno-plt
rafaelcfsousa at ibm dot com
gcc-bugzilla@gcc.gnu.org
Sat Mar 12 14:45:31 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104894
Bug ID: 104894
Summary: [ppc64le] gcc11 ICE with -fno-plt
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: rafaelcfsousa at ibm dot com
Target Milestone: ---
When I use the flag "-fno-plt" together with "-O2 -mcpu=power10" on gcc11, the
compilation fails.
Some important points:
- The ICE shows up only when I use optimization level -O2 or higher
- If I replace "-mcpu=power10" by "-mcpu=power9", the compilation works fine
- The same error does not happen on gcc10
gcc version:
- gcc (GCC) 11.2.1 20220312 [remotes/origin/releases/gcc-11 revision
6f581f90e3:53ab7b79c6:908e612067e42ded881db10d38768f23307bf55e]
- gcc (GCC) 11.2.1 20220211 (Advance-Toolchain 15.0-2) [64575dfb22ae]
- gcc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)
- gcc (GCC) 12.0.1 20220312 (experimental) [remotes/origin/HEAD
r12-7622-g828335beb7]
The error shows up on all GCCs above.
the system type: ppc64le (powerpc64le-unknown-linux-gnu)
Configured with: /home/gccbuild/gcc_11_git/gcc/configure
--prefix=/opt/gcc-nightly/11 --with-as=/home/gccbuild/binutils/install/bin/as
--with-ld=/home/gccbuild/binutils/install/bin/ld
--enable-languages=c,c++,fortran,objc,obj-c++ --with-cpu=power10
source file:
issue.c
```
void foo();
void bar() {
foo();
}
```
the complete command line that triggers the bug:
gcc -O3 -mcpu=power10 -mtune=power10 -fno-plt -c issue.c -o issue.o
the compiler output (error messages, warnings, etc.):
during RTL pass: expand
issue.c: In function ‘bar’:
issue.c:4:4: internal compiler error: in rs6000_sibcall_aix, at
config/rs6000/rs6000.cc:25654
4 | foo();
| ^~~~~
0x11073563 rs6000_sibcall_aix(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
/home/gccbuild/gcc_trunk_git/gcc/gcc/config/rs6000/rs6000.cc:25654
0x116acc5f gen_sibcall(rtx_def*, rtx_def*, rtx_def*)
/home/gccbuild/gcc_trunk_git/gcc/gcc/config/rs6000/rs6000.md:11573
0x1104f17f target_gen_sibcall
/home/gccbuild/gcc_trunk_git/gcc/gcc/config/rs6000/rs6000.md:13266
0x10486a0f emit_call_1
/home/gccbuild/gcc_trunk_git/gcc/gcc/calls.cc:469
0x1048f363 expand_call(tree_node*, rtx_def*, int)
/home/gccbuild/gcc_trunk_git/gcc/gcc/calls.cc:3608
0x106614eb expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/gccbuild/gcc_trunk_git/gcc/gcc/expr.cc:11539
0x104b0887 expand_expr
/home/gccbuild/gcc_trunk_git/gcc/gcc/expr.h:301
0x104b0887 expand_call_stmt
/home/gccbuild/gcc_trunk_git/gcc/gcc/cfgexpand.cc:2831
0x104b0887 expand_gimple_stmt_1
/home/gccbuild/gcc_trunk_git/gcc/gcc/cfgexpand.cc:3869
0x104b0887 expand_gimple_stmt
/home/gccbuild/gcc_trunk_git/gcc/gcc/cfgexpand.cc:4033
0x104b850b expand_gimple_tailcall
/home/gccbuild/gcc_trunk_git/gcc/gcc/cfgexpand.cc:4079
0x104b850b expand_gimple_basic_block
/home/gccbuild/gcc_trunk_git/gcc/gcc/cfgexpand.cc:6054
0x104ba5d7 execute
/home/gccbuild/gcc_trunk_git/gcc/gcc/cfgexpand.cc:6806
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
using --save-temps:
issue.s
```
.file "issue.c"
.machine power10
.abiversion 2
.section ".text"
```
issue.i
```
# 0 "issue.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "issue.c"
void foo();
void bar() {
foo();
}
```
More information about the Gcc-bugs
mailing list