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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
But we should also be rejecting:
```
struct A {
    __attribute__((__vector_size__(4))) int d : 1;
};

struct A b = {0};
```
Which we currently accepts before and ICE now.

Note for the float case, we could in theory change:
```
  /* Detect invalid bit-field type.  */
  if (TREE_CODE (*type) != INTEGER_TYPE
      && TREE_CODE (*type) != BOOLEAN_TYPE
      && TREE_CODE (*type) != ENUMERAL_TYPE
      && TREE_CODE (*type) != BITINT_TYPE)
    {
      error_at (loc, "bit-field %qs has invalid type", name);
      *type = unsigned_type_node;
    }

```
to use error_mark_node instead of unsigned_type_node here and that would fix
the ICE for the original testcase but not the above testcase.

Reply via email to