diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2022-04-06 20:33:45 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2022-04-06 20:33:45 +0100 |
commit | 2ce0608ca3dca30518bec525c435f7bc4d7f9b70 (patch) | |
tree | a1476844d75a1bf7ee70e5537892d491fd1d5c6a /gcc/cp/decl2.cc | |
parent | f2553650a9bdc15b9bde8f275bfa0581a2dfa002 (diff) | |
parent | 61bee6aed26eb30b798c75b9a595c9d51e080442 (diff) | |
download | gcc-2ce0608ca3dca30518bec525c435f7bc4d7f9b70.tar.gz |
Merge master r12-8030.
* Merge master r12-8030-g61bee6aed26e.
Diffstat (limited to 'gcc/cp/decl2.cc')
-rw-r--r-- | gcc/cp/decl2.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc index c53acf4546d..dc2c924c472 100644 --- a/gcc/cp/decl2.cc +++ b/gcc/cp/decl2.cc @@ -1336,7 +1336,7 @@ splice_template_attributes (tree *attr_p, tree decl) tree late_attrs = NULL_TREE; tree *q = &late_attrs; - if (!p) + if (!p || *p == error_mark_node) return NULL_TREE; for (; *p; ) @@ -1631,7 +1631,7 @@ void cplus_decl_attributes (tree *decl, tree attributes, int flags) { if (*decl == NULL_TREE || *decl == void_type_node - || *decl == error_mark_node) + || *decl == error_mark_node || attributes == error_mark_node) return; /* Add implicit "omp declare target" attribute if requested. */ @@ -1668,7 +1668,7 @@ cplus_decl_attributes (tree *decl, tree attributes, int flags) cp_check_const_attributes (attributes); - if ((flag_openmp || flag_openmp_simd) && attributes != error_mark_node) + if (flag_openmp || flag_openmp_simd) { bool diagnosed = false; for (tree *pa = &attributes; *pa; ) |