aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-decl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c/c-decl.cc')
-rw-r--r--gcc/c/c-decl.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc
index a02fed1..e79f77e 100644
--- a/gcc/c/c-decl.cc
+++ b/gcc/c/c-decl.cc
@@ -9774,6 +9774,13 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes,
unsigned HOST_WIDE_INT width
= tree_to_uhwi (DECL_INITIAL (field));
tree type = TREE_TYPE (field);
+ if (VECTOR_TYPE_P (type))
+ {
+ error_at (DECL_SOURCE_LOCATION (field),
+ "bit-field %qD has invalid type", field);
+ type = TREE_TYPE (type);
+ TREE_TYPE (field) = type;
+ }
if (width != TYPE_PRECISION (type))
{
if (TREE_CODE (type) == BITINT_TYPE