OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [alignof2.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PRs 16387 and 16389
2
// We were treating alignof (sa.a) as alignof (typeof (sa.a)), which is
3
// wrong for some fields.
4
 
5
// { dg-do run }
6
 
7
extern "C" void abort();
8
 
9
struct A
10
{
11
  double a;
12
} sa;
13
 
14
struct B
15
{
16
  char c;
17
  double b;
18
} sb;
19
 
20
int main()
21
{
22
  if (__alignof (sa) != __alignof (sa.a)
23
      || __alignof (sb) != __alignof (sb.b))
24
    abort();
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.