===================================================================
@@ -1534,7 +1534,8 @@ struct GTY(()) tree_type_common {
unsigned warn_if_not_align : 6;
unsigned typeless_storage : 1;
unsigned empty_flag : 1;
- unsigned spare : 17;
+ unsigned sizeless : 1;
+ unsigned spare : 16;
alias_set_type alias_set;
tree pointer_to;
===================================================================
@@ -688,6 +688,13 @@ #define TRANSLATION_UNIT_WARN_EMPTY_P(NO
/* Nonzero if this type is "empty" according to the particular psABI. */
#define TYPE_EMPTY_P(NODE) (TYPE_CHECK (NODE)->type_common.empty_flag)
+/* True if this type is "sizeless" according to the SVE extensions to
+ C and C++. Sizeless types have no measurable size or alignment at
+ the language level, even when the types have been fully defined
+ (are "definite"). Size, alignment and layout are instead decided
+ by the ABI. */
+#define TYPE_SIZELESS_P(NODE) (TYPE_CHECK (NODE)->type_common.sizeless)
+
/* Used to indicate that this TYPE represents a compiler-generated entity. */
#define TYPE_ARTIFICIAL(NODE) (TYPE_CHECK (NODE)->base.nowarning_flag)
===================================================================
@@ -727,7 +727,8 @@ enum cxx_dialect {
extern bool done_lexing;
/* Nonzero if this type is a complete type. */
-#define COMPLETE_TYPE_P(NODE) (TYPE_SIZE (NODE) != NULL_TREE)
+#define COMPLETE_TYPE_P(NODE) \
+ (TYPE_SIZE (NODE) != NULL_TREE && !TYPE_SIZELESS_P (NODE))
/* C types are partitioned into three subsets: object, function, and
incomplete types. */