aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/attrib20.C
blob: e46e8ae20776b5e33282f3a5c53e3dc1c06d60c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do compile }
// { 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 __attribute__ ((aligned(8)));    // { dg-bogus "attribute" "attribute" { xfail *-*-* } }
  typedef T2 value_type2 __attribute__ ((aligned(8)));  // { dg-bogus "attribute" "attribute" { xfail *-*-* } }
  value_type v;
};
BVector<int> m;

template <template <class> class T>
struct BV2
{
  typedef T<float> value_type __attribute__((aligned(8))); // { dg-bogus "attribute" "attribute" { xfail *-*-* } }
  value_type v;
};
BV2<BVector> m2;