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

            Bug ID: 87286
           Summary: ICE on vectors of enums
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---

This testcase:

enum foo { F };
typedef enum foo vec_foo __attribute__((vector_size (16)));
vec_foo add (vec_foo x, vec_foo y) { return x + y; }

triggers:

internal compiler error: in vector_types_compatible_elements_p

This seems to be a disagreement between handle_vector_size_attribute (which
accepts INTEGRAL_TYPE_Ps except BOOLEAN_TYPE) and
vector_types_compatible_elements_p (which uses INTEGER_TYPE instead of
INTEGRAL_TYPE_P).  Not sure whether the intent was to forbid vectors of enums,
so not sure whether this is ice-on-valid or ice-on-invalid.

Reply via email to