summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/alignof.C
blob: d6af268412d5debd23dbb3847dbc26652e96f290 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do run  }
extern "C" void abort();

struct S
{
  char c;
  double d;
};


template <class T>
void foo(T)
{
  if (__alignof__(T) != __alignof__(S))
    abort();
}


int main()
{
  foo(S());
}