aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2008-02-13 16:27:16 -0500
committerJason Merrill <jason@gcc.gnu.org>2008-02-13 16:27:16 -0500
commit8d2eb30433ecedf4db7e00b62320973a587f4216 (patch)
treef0a53631f0a7643da1914e48d93b1ae0fd356267 /gcc/cp/decl2.c
parent1b0c753a864e5d059a7cdd792b982b45cf4c9549 (diff)
downloadgcc-8d2eb30433ecedf4db7e00b62320973a587f4216.zip
gcc-8d2eb30433ecedf4db7e00b62320973a587f4216.tar.gz
gcc-8d2eb30433ecedf4db7e00b62320973a587f4216.tar.bz2
PR c++/34962, c++/34937, c++/34939
PR c++/34962, c++/34937, c++/34939 * decl2.c (is_late_template_attribute): Always defer attributes vector_size and weak. From-SVN: r132297
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 1832926..695390c 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -991,6 +991,13 @@ is_late_template_attribute (tree attr, tree decl)
/* Unknown attribute. */
return false;
+ /* Attribute vector_size handling wants to dive into the back end array
+ building code, which breaks during template processing. */
+ if (is_attribute_p ("vector_size", name)
+ /* Attribute weak handling wants to write out assembly right away. */
+ || is_attribute_p ("weak", name))
+ return true;
+
/* If any of the arguments are dependent expressions, we can't evaluate
the attribute until instantiation time. */
for (arg = args; arg; arg = TREE_CHAIN (arg))