diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 229c84e1d74..1426f9a5434 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -427,6 +427,11 @@ build_value_init_noctor (tree type, tsubst_flags_t complain) == NULL_TREE)) continue; + /* Ignore unnamed zero-width bitfields. */ + if (DECL_UNNAMED_BIT_FIELD (field) + && integer_zerop (DECL_SIZE (field))) + continue; + /* We could skip vfields and fields of types with user-defined constructors, but I think that won't improve performance at all; it should be simpler in general just