From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EC43D3858C60; Tue, 26 Mar 2024 16:04:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC43D3858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711469093; bh=c9iGpJ+N7RzOMZqMLcfiG6NONeZj7aAJqOipct8k/U8=; h=From:To:Subject:Date:From; b=geUad0PntKP4gusLpRsyrVKsZDvFNhI1e5UNuUbTgf3kAKqgwBzSa1Rbny0JRNpEQ gURsuQHChXX7KcZQl3RuxRe/mCtzMO425q2JoJQqdeymoHb7jhUbz4+8WKoOi0EaAb X4J5kDdJTErAMWxPkWJE6M8gIaw1TBi/wUuWj3/w= From: "sjames at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114487] New: [14 regression] ICE when building libsdl2 on -mfpmath=sse x86 with LTO Date: Tue, 26 Mar 2024 16:04:53 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: sjames at gcc dot gnu.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 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114487 Bug ID: 114487 Summary: [14 regression] ICE when building libsdl2 on -mfpmath=3Dsse x86 with LTO Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- I'm not sure if this is really a target bug, or an LTO option merging bug. I suspect the issue comes down to mismatch of -mfpmath=3Dsse and -msse -msse2= - but I may be wrong. Here's a reduction but it might be a bad one, as there's conflicting return types here. ``` $ cat SDL_test_fuzzer.i void SDLTest_RandomUnitFloat() { } ``` ``` $ cat testautomation-testautomation_pixels.i void SDLTest_RunSuites(); void SDLTest_AssertPass(); float SDLTest_RandomUnitFloat(); typedef struct { int testCase; } SDLTest_TestCaseReference; typedef struct { char *name; void *testSetUp; SDLTest_TestCaseReference *testCases; void *testTearDown; } SDLTest_TestSuiteReference; void pixels_calcGammaRamp() { float gamma =3D SDLTest_RandomUnitFloat(); SDLTest_AssertPass(gamma); } SDLTest_TestCaseReference pixelsTests[] =3D {(int)pixels_calcGammaRamp}; SDLTest_TestSuiteReference pixelsTestSuite =3D {0, pixelsTests}; int main() { SDLTest_TestSuiteReference *testSuites =3D &pixelsTestSuite; SDLTest_RunSuites(testSuites); } ``` ``` $ gcc -O3 -pipe -march=3Di686 -mfpmath=3Dsse -flto -mmmx -msse -msse2 -fno-strict-aliasing SDL_test_fuzzer.i -fPIC -o SDL_test_fuzzer.o -c $ gcc -O3 -march=3Di686 -flto -o a testautomation-testautomation_pixels.i SDL_test_fuzzer.o testautomation-testautomation_pixels.i: In function =E2=80=98pixels_calcGam= maRamp=E2=80=99: testautomation-testautomation_pixels.i:17:1: error: unrecognizable insn: 17 | } | ^ (insn 6 5 7 2 (set (reg/v:SF 100 [ gamma ]) (reg:SF 20 xmm0)) "testautomation-testautomation_pixels.i":15:17 -1 (nil)) during RTL pass: vregs testautomation-testautomation_pixels.i:17:1: internal compiler error: in extract_insn, at recog.cc:2812 0x5722510f _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/rtl-error.cc:108 0x57225146 _fatal_insn_not_found(rtx_def const*, char const*, int, char con= st*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/rtl-error.cc:116 0x56d46375 extract_insn(rtx_insn*) /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/recog.cc:2= 812 0x56d46375 instantiate_virtual_regs_in_insn =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/function.cc:1611 0x56d46375 instantiate_virtual_regs =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/function.cc:1994 0x56d46375 execute =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/function.cc:2041 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: gcc returned 1 exit status compilation terminated. /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../i686-pc-linux-gnu/bin/ld: err= or: lto-wrapper failed collect2: error: ld returned 1 exit status ```=