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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [c1x-align-1.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Test C1X alignment support.  Test valid code.  */
2
/* { dg-do compile } */
3
/* { dg-options "-std=c1x -pedantic-errors" } */
4
 
5
#include <stddef.h>
6
 
7
_Alignas (_Alignof (max_align_t)) char c;
8
extern _Alignas (max_align_t) char c;
9
extern char c;
10
 
11
extern _Alignas (max_align_t) short s;
12
_Alignas (max_align_t) short s;
13
 
14
_Alignas (int) int i;
15
extern int i;
16
 
17
_Alignas (max_align_t) long l;
18
 
19
_Alignas (max_align_t) long long ll;
20
 
21
_Alignas (max_align_t) float f;
22
 
23
_Alignas (max_align_t) double d;
24
 
25
_Alignas (max_align_t) _Complex long double cld;
26
 
27
_Alignas (0) _Alignas (int) _Alignas (char) char ca[10];
28
 
29
_Alignas ((int) _Alignof (max_align_t) + 0) int x;
30
 
31
enum e { E = _Alignof (max_align_t) };
32
_Alignas (E) int y;
33
 
34
void
35
func (void)
36
{
37
  _Alignas (max_align_t) long long auto_ll;
38
}
39
 
40
/* Valid, but useless.  */
41
_Alignas (0) struct s; /* { dg-warning "useless" } */

powered by: WebSVN 2.1.0

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