1 /* PR c/89812 - incorrect maximum in error: requested alignment '536870912'
2    exceeds maximum 2147483648
3    Limit to ELF targets that are known to use MAX_OFILE_ALIGNMENT
4    (1 << 28) * BITS_PER_UNIT.
5    { dg-do compile { target { { *-*-elf* *-*-gnu* *-*-solaris2.* } && { ! avr*-*-* } } } }
6    { dg-require-effective-target size32plus }
7    { dg-options "" } */
8 
9 #define POWALIGN(N) __attribute__ ((aligned ((__UINT64_TYPE__)1 << (N))))
10 
11 typedef POWALIGN (28) char T28;
12 
13 /* The maximum alignment is constrained by the number of bits in int
14    on host minus 3: HOST_BITS_PER_INT - LOG2_BITS_PER_UNIT.  The test
15    assumes host int is 32-bits wide.  */
16 typedef POWALIGN (29) char X29;  /* { dg-error "requested alignment .536870912. exceeds maximum 268435456" } */
17 typedef POWALIGN (30) char X30;  /* { dg-error "requested alignment .1073741824. exceeds maximum 268435456" } */
18 typedef POWALIGN (31) char X31;  /* { dg-error "requested alignment .2147483648. exceeds maximum 268435456" } */
19 typedef POWALIGN (32) char X32;  /* { dg-error "requested alignment .4294967296. exceeds maximum 268435456" } */
20 typedef POWALIGN (60) char X60;  /* { dg-error "requested alignment .1152921504606846976. exceeds maximum 268435456" } */
21 typedef POWALIGN (63) char X63;  /* { dg-error "requested alignment .9223372036854775808. exceeds maximum 268435456" } */
22 
23 
24 POWALIGN (28) char c28;
25 
26 POWALIGN (29) char c29;  /* { dg-error "requested alignment .536870912. exceeds object file maximum 268435456" } */
27 POWALIGN (30) char x30;  /* { dg-error "requested alignment .1073741824. exceeds object file maximum 268435456" } */
28 POWALIGN (31) char x31;  /* { dg-error "requested alignment .2147483648. exceeds object file maximum 268435456" } */
29 POWALIGN (32) char x32;  /* { dg-error "requested alignment .4294967296. exceeds object file maximum 268435456" } */
30 POWALIGN (60) char x60;  /* { dg-error "requested alignment .1152921504606846976. exceeds object file maximum 268435456" } */
31 POWALIGN (63) char x63;  /* { dg-error "requested alignment .9223372036854775808. exceeds object file maximum 268435456" } */
32