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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The difference is that in GIMPLE shift/rotate count operands are usually
promoted or demoted to int or unsigned int type or type uselessly compatible
with that.
Without -fshort-enums, 32-bit ENUMERAL_TYPE doesn't need any casts, so it is
whatever << x where x is a parameter with test_enum type.
While with -fshort-enums, the ENUMERAL_TYPE is 8-bit or 16-bit and so the IL is
instead
_1 = (int) x;
whatever << _1;

Reply via email to