]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Tweak i386-expand.cc to restore bootstrap on RHEL.
authorRoger Sayle <roger@nextmovesoftware.com>
Sun, 14 Jul 2024 16:22:27 +0000 (17:22 +0100)
committerRoger Sayle <roger@nextmovesoftware.com>
Sun, 14 Jul 2024 16:22:27 +0000 (17:22 +0100)
commit74e6dfb23163c2dd670d1d60fbf4c782e0b44b94
tree92d3ed11e6e957cc050c3dde92ac21301eea8a49
parent44c9403ed1833ae71a59e84f9e37af3182be0df5
i386: Tweak i386-expand.cc to restore bootstrap on RHEL.

This is a minor change to restore bootstrap on systems using gcc 4.8
as a host compiler.  The fatal error is:

In file included from gcc/gcc/coretypes.h:471:0,
                 from gcc/gcc/config/i386/i386-expand.cc:23:
gcc/gcc/config/i386/i386-expand.cc: In function 'void ix86_expand_fp_absneg_operator(rtx_code, machine_mode, rtx_def**)':
./insn-modes.h:315:75: error: temporary of non-literal type 'scalar_float_mode' in a constant expression
 #define HFmode (scalar_float_mode ((scalar_float_mode::from_int) E_HFmode))
                                                                           ^
gcc/gcc/config/i386/i386-expand.cc:2179:8: note: in expansion of macro 'HFmode'
   case HFmode:
        ^

The solution is to use the E_?Fmode enumeration constants as case values
in switch statements.

2024-07-14  Roger Sayle  <roger@nextmovesoftware.com>

* config/i386/i386-expand.cc (ix86_expand_fp_absneg_operator):
Use E_?Fmode enumeration constants in switch statement.
(ix86_expand_copysign): Likewise.
(ix86_expand_xorsign): Likewise.
gcc/config/i386/i386-expand.cc