https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114487

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[14 regression] ICE when    |ICE when building libsdl2
                   |building libsdl2 on         |on -mfpmath=sse x86 with
                   |-mfpmath=sse x86 with LTO   |LTO
      Known to fail|                            |12.3.1, 13.2.1, 14.0, 7.5.0
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-03-27
           Keywords|                            |lto
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I can confirm the ICE.  We're expanding

;; gamma_4 = SDLTest_RandomUnitFloat ();

(call_insn/u 5 4 6 (set (reg:SF 20 xmm0)
        (call (mem:QI (symbol_ref:SI ("SDLTest_RandomUnitFloat") [flags 0x3] 
<function_decl 0x7f8b97072200 SDLTest_RandomUnitFloat>) [0
SDLTest_RandomUnitFloat S1 A8])
            (const_int 0 [0]))) "testautomation-testautomation_pixels.i":15:17
-1
     (expr_list:REG_CALL_DECL (symbol_ref:SI ("SDLTest_RandomUnitFloat") [flags
0x3]  <function_decl 0x7f8b97072200 SDLTest_RandomUnitFloat>)
        (expr_list:REG_EH_REGION (const_int 0 [0])
            (nil)))
    (nil))

(insn 6 5 0 (set (reg/v:SF 99 [ gamma ])
        (reg:SF 20 xmm0)) "testautomation-testautomation_pixels.i":15:17 -1
     (nil))

I'm not sure what's wrong - looks like a target issue to me.

I'll note -mmmx -msse isn't necessary, -msse2 is enough.  Likewise -fPIC
isn't required.  I've reproduced with -m32 added on x86_64.

GCC 13/12 are also broken the same way and GCC 7 doesn't terminate compiling.

So I'm not sure whether this is a regression (the reduced testcase, that is).
I can't find a version that works.

Reply via email to