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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [pragma-align-2.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run { target *-*-solaris2.* } } */
2
 
3
void abort (void);
4
 
5
#pragma align 1(x1)
6
#pragma align 2(x2)
7
#pragma align 4(x4)
8
#pragma align 8(x8,y8,z8)
9
#pragma align 16(x16)
10
#pragma align 32(x32)
11
#pragma align 64(x64)
12
#pragma align 128(x128)
13
 
14
#define MACRO 128
15
#define MACRO2(A) A
16
 
17
#pragma align MACRO(y128)
18
#pragma align MACRO2(MACRO) (z128)
19
 
20
#pragma align 8(not_defined)
21
 
22
#pragma align 9(odd_align)      /* { dg-error "invalid alignment" } */
23
#pragma align 256(high_align)   /* { dg-error "invalid alignment" } */
24
#pragma align -1(neg_align)     /* { dg-error "malformed" } */
25
#pragma align bad_align         /* { dg-error "malformed" } */
26
#pragma align 1(bad_align       /* { dg-error "malformed" } */
27
 
28
int x, x1, x2, x4, x8, y8, z8, x16, x32, x64, x128, y128, z128;
29
 
30
#pragma align 16(x)             /* { dg-error "must appear before" } */
31
 
32
int
33
main ()
34
{
35
  if (__alignof__ (x4) < 4)
36
    abort ();
37
 
38
  if (__alignof__ (x8) < 8)
39
    abort ();
40
 
41
  if (__alignof__ (y8) < 8)
42
    abort ();
43
 
44
  if (__alignof__ (z8) < 8)
45
    abort ();
46
 
47
  if (__alignof__ (x16) < 16)
48
    abort ();
49
 
50
  if (__alignof__ (x32) < 32)
51
    abort ();
52
 
53
  if (__alignof__ (x64) < 64)
54
    abort ();
55
 
56
  if (__alignof__ (x128) < 128)
57
    abort ();
58
 
59
  if (__alignof__ (y128) < 128)
60
    abort ();
61
 
62
  if (__alignof__ (z128) < 128)
63
    abort ();
64
 
65
  return 0;
66
}

powered by: WebSVN 2.1.0

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