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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pragma-align-2.c] - Blame information for rev 753

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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