From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB4623858427; Tue, 2 Jan 2024 01:52:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB4623858427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704160371; bh=/SVZVZEmjsrrqi62at4YkRPYVquiCp2dpAtVNAmn+ZY=; h=From:To:Subject:Date:From; b=KrsfB/ws2X8lBLRDeapOlhxNTCu1uWwFdoqVCiOUCVJRfKzH7aj42O6e7uqNAEFwN 61uZhRsd35dnazFeQY3jDpwEGnJsjKjhjyEmE/XKSmTqgHD6fLQa+nS418MQIc/wC0 uu1qBR6HLJNCRFpIlQ7NY6nl6p1/mRJY3iKi+t80= From: "zack+gcc at buhman dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113193] New: [SH] ICE in gen_reg_rtx, at emit-rtl.cc:1177 with -mfcsa -funsafe-math-operations Date: Tue, 02 Jan 2024 01:52:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zack+gcc at buhman dot org 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 cf_gcctarget attachments.created 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113193 Bug ID: 113193 Summary: [SH] ICE in gen_reg_rtx, at emit-rtl.cc:1177 with -mfcsa -funsafe-math-operations Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: zack+gcc at buhman dot org Target Milestone: --- Target: sh*-*-* Created attachment 56971 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56971&action=3Dedit -freport-bug On the sh*-*-* target it is possible to generate an ICE at all optimization levels above -O0 with -mfcsa -funsafe-math-optimizations , for certain sequences of valid code that contain __builtin_cosf and/or __builtin_sinf. The attached -freport-bug output is one (500-line) example that only appear= s to trigger this ICE at -O3, but other (perhaps more convoluted) examples are possible. This affects all GCC versions between at least 9.5.0 and the current 14.0 master, inclusive. I did not test GCC versions older than 9.5.0.=