https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124909
Dhruv Chawla <dhruvc at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dhruvc at gcc dot gnu.org
--- Comment #8 from Dhruv Chawla <dhruvc at gcc dot gnu.org> ---
Thanks for fixing this. I really struggled with how types are handled in GIMPLE
while writing this patch. Though, given the following:
/* Nonzero if TYPE represents an integral type. Note that we do not
include COMPLEX types here. Keep these checks in ascending code
order. */
#define INTEGRAL_TYPE_P(TYPE) \
(TREE_CODE (TYPE) == ENUMERAL_TYPE \
|| TREE_CODE (TYPE) == BOOLEAN_TYPE \
|| TREE_CODE (TYPE) == INTEGER_TYPE \
|| TREE_CODE (TYPE) == BITINT_TYPE)
What changes with -fshort-enums such that the fold stops working? Wouldn't
test_enum x still be an ENUMERAL_TYPE?