2010-01-04 Jason Merrill <jason@redhat.com>
+ PR c++/42555
+ * pt.c (tsubst_decl): Don't apply type attributes in place.
+
PR c++/42567
* semantics.c (describable_type): Remove decltype comment and
semantics.
TREE_CHAIN (r) = NULL_TREE;
apply_late_template_attributes (&r, DECL_ATTRIBUTES (r),
- (int) ATTR_FLAG_TYPE_IN_PLACE,
+ /*flags=*/0,
args, complain, in_decl);
/* Preserve a typedef that names a type. */
2010-01-04 Jason Merrill <jason@redhat.com>
+ PR c++/42555
+ * g++.dg/ext/attrib35.C: New.
+
PR c++/42567
* g++.dg/cpp0x/auto17.C: New.
--- /dev/null
+// { dg-do compile { target i*86-*-* x86_64-*-* } }
+// { dg-options "-O3 -msse2" }
+
+// You can make NON-template typedefs with a large alignment.
+typedef double AlignedDoubleType __attribute__((aligned(16)));
+
+template <typename RealType>
+RealType f(const RealType* p)
+{
+ // But if you use a template parameter it complains.
+ typedef RealType AlignedRealType __attribute__((aligned(16)));
+
+ return p[0];
+}
+
+double f2(const double* p)
+{
+ return f<double>(p);
+}