From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 81ACB3857418; Tue, 3 May 2022 05:24:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81ACB3857418 From: "asolokha at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/105459] New: ICE: Segmentation fault (in record_operand_costs) Date: Tue, 03 May 2022 05:24:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: asolokha at gmx 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 keywords 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: Tue, 03 May 2022 05:24:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105459 Bug ID: 105459 Summary: ICE: Segmentation fault (in record_operand_costs) Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gcc 12.0.1 20220424 snapshot (g:6b7441a46c771aa6ecdc0c8ed96197417d036b9a) I= CEs when compiling the following testcase w/ -O1 -flto: double m; int n; __attribute__ ((optimize ("-funsafe-math-optimizations"))) void bar (int x) { n =3D x; m =3D n; } __attribute__ ((flatten)) void foo (int x) { bar (x); } void quux (void) { ++n; } int main (void) { foo (0); quux (); return 0; } % x86_64-unknown-linux-gnu-gcc-12.0.1 -O1 -flto qnipdldf.c during RTL pass: ira qnipdldf.c: In function 'main': qnipdldf.c:30:1: internal compiler error: Segmentation fault 30 | } | ^ 0xd95abf crash_signal =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220424/work/gcc-12-20220424/gcc/to= plev.cc:322 0xbabeb8 record_operand_costs =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220424/work/gcc-12-20220424/gcc/ir= a-costs.cc:1382 0xbac464 scan_one_insn =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220424/work/gcc-12-20220424/gcc/ir= a-costs.cc:1507 0xbac464 process_bb_for_costs =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220424/work/gcc-12-20220424/gcc/ir= a-costs.cc:1632 0xba2ae1 ira_traverse_loop_tree(bool, ira_loop_tree_node*, void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220424/work/gcc-12-20220424/gcc/ir= a-build.cc:1800 0xbad545 find_costs_and_classes =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220424/work/gcc-12-20220424/gcc/ir= a-costs.cc:1728 0xbae639 ira_costs() =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220424/work/gcc-12-20220424/gcc/ir= a-costs.cc:2276 0xba806c ira_build() =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220424/work/gcc-12-20220424/gcc/ir= a-build.cc:3481 0xb9dd0c ira =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220424/work/gcc-12-20220424/gcc/ir= a.cc:5760 0xb9dd0c execute =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220424/work/gcc-12-20220424/gcc/ir= a.cc:6083 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. lto-wrapper: fatal error: x86_64-unknown-linux-gnu-gcc-12.0.1 returned 1 ex= it status compilation terminated. /usr/lib/gcc/x86_64-unknown-linux-gnu/12.0.1/../../../../x86_64-unknown-lin= ux-gnu/bin/ld: fatal error: lto-wrapper failed=