diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/gen-attrs-20.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/gen-attrs-20.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-20.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-20.C new file mode 100644 index 0000000000..f989ab2078 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-20.C @@ -0,0 +1,22 @@ +// { dg-do compile { target c++11 } } +// { dg-options "-g" } +// Origin: <jan at etpmod dot phys dot tue dot nl> +// PR c++/19508: avoid attributes for template parameters + +template <typename T> +struct BVector +{ + typedef T T2; + typedef T value_type [[gnu::aligned(8)]]; // { dg-bogus "attribute" "attribute" } + typedef T2 value_type2 [[gnu::aligned(8)]]; // { dg-bogus "attribute" "attribute" } + value_type v; +}; +BVector<int> m; + +template <template <class> class T> +struct BV2 +{ + typedef T<float> value_type [[gnu::aligned(8)]]; // { dg-bogus "attribute" "attribute" } + value_type v; +}; +BV2<BVector> m2; |