From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69C753858C78; Sat, 12 Mar 2022 14:45:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69C753858C78 From: "rafaelcfsousa at ibm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/104894] New: [ppc64le] gcc11 ICE with -fno-plt Date: Sat, 12 Mar 2022 14:45:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rafaelcfsousa at ibm dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2022 14:45:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104894 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=3Dpower10" 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=3Dpower10" by "-mcpu=3Dpower9", 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=3D/opt/gcc-nightly/11 --with-as=3D/home/gccbuild/binutils/install/= bin/as --with-ld=3D/home/gccbuild/binutils/install/bin/ld --enable-languages=3Dc,c++,fortran,objc,obj-c++ --with-cpu=3Dpower10 source file: issue.c ``` void foo(); void bar() { foo(); } ``` the complete command line that triggers the bug: gcc -O3 -mcpu=3Dpower10 -mtune=3Dpower10 -fno-plt -c issue.c -o issue.o the compiler output (error messages, warnings, etc.): during RTL pass: expand issue.c: In function =E2=80=98bar=E2=80=99: 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 for instructions. using --save-temps: issue.s ``` .file "issue.c" .machine power10 .abiversion 2 .section ".text" ``` issue.i ``` # 0 "issue.c" # 0 "" # 0 "" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 0 "" 2 # 1 "issue.c" void foo(); void bar() { foo(); } ```=