diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 19412d2637d3f..baa86e28c4089 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -2573,6 +2573,7 @@ c_parser_static_assert_declaration_no_semi (c_parser *parser) volatile address-space-qualifier _Atomic + _Dependent_ptr (restrict is new in C99.) (_Atomic is new in C11.) diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h index 7c67a63aa7079..ea436aedef515 100644 --- a/gcc/c/c-tree.h +++ b/gcc/c/c-tree.h @@ -34,6 +34,9 @@ along with GCC; see the file COPYING3. If not see /* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is volatile. */ #define C_TYPE_FIELDS_VOLATILE(TYPE) TREE_LANG_FLAG_2 (TYPE) +/* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is dependent pointer. */ +#define C_TYPE_FIELDS_DEPENDENT_PTR(TYPE) TREE_LANG_FLAG_3 (TYPE) + /* In a RECORD_TYPE or UNION_TYPE or ENUMERAL_TYPE nonzero if the definition of the type has already started. */ #define C_TYPE_BEING_DEFINED(TYPE) TYPE_LANG_FLAG_0 (TYPE) diff --git a/gcc/tree-core.h b/gcc/tree-core.h index 20d6b31d5f143..4307ee1a2c41b 100644 --- a/gcc/tree-core.h +++ b/gcc/tree-core.h @@ -948,6 +948,7 @@ struct GTY(()) tree_base { unsigned asm_written_flag: 1; unsigned nowarning_flag : 1; unsigned visited : 1; + unsigned dependent_ptr_flag : 1; unsigned used_flag : 1; unsigned nothrow_flag : 1; @@ -976,8 +977,7 @@ struct GTY(()) tree_base { unsigned user_align : 1; unsigned nameless_flag : 1; unsigned atomic_flag : 1; - unsigned dependent_ptr_flag : 1; - unsigned spare0 : 2; + unsigned spare0 : 3; unsigned spare1 : 8; diff --git a/gcc/tree.h b/gcc/tree.h index 1e712dcc23d00..a214e08172131 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -787,6 +787,9 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, If this bit is set in an expression, so is TREE_SIDE_EFFECTS. */ #define TREE_THIS_VOLATILE(NODE) ((NODE)->base.volatile_flag) +/* Nonzero means this expression is having data dependence somewhere. */ +#define TREE_THIS_DEPENDENT_PTR(NODE) ((NODE)->base.dependent_ptr_flag) + /* Nonzero means this node will not trap. In an INDIRECT_REF, means accessing the memory pointed to won't generate a trap. However, this only applies to an object when used appropriately: it doesn't @@ -2052,7 +2055,7 @@ extern machine_mode vector_type_mode (const_tree); #define TYPE_ATOMIC(NODE) (TYPE_CHECK (NODE)->base.u.bits.atomic_flag) /* Nonzero in a type considered dependent_ptr as a whole. */ -#define TYPE_DEPENDENT_PTR(NODE) (TYPE_CHECK (NODE)->base.u.bits.dependent_ptr_flag) +#define TYPE_DEPENDENT_PTR(NODE) (TYPE_CHECK (NODE)->base.dependent_ptr_flag) /* Means this type is const-qualified. */ #define TYPE_READONLY(NODE) (TYPE_CHECK (NODE)->base.readonly_flag)