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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [compat/] [struct-align-1.h] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* Define several variants of a struct for which the alignment differs
2
   between powerpc64-linux and powerpc64-aix.  This might be interesting
3
   for other targets as well.  */
4
 
5
#define DESC_orig "original"
6
struct B1_orig {
7
  char c;
8
  double d;
9
};
10
 
11
struct A2_orig {
12
  double d;
13
};
14
 
15
struct B2_orig {
16
  char c;
17
  struct A2_orig a2;
18
};
19
 
20
struct A3_orig {
21
  double d;
22
  int i;
23
};
24
 
25
struct B3_orig {
26
  char c;
27
  struct A3_orig a3;
28
};
29
 
30
#ifndef SKIP_ATTRIBUTE
31
#define DESC_p_all "packed attribute for all"
32
struct B1_p_all {
33
  char c;
34
  double d;
35
} __attribute__ ((packed));
36
 
37
struct A2_p_all {
38
  double d;
39
} __attribute__ ((packed));
40
 
41
struct B2_p_all {
42
  char c;
43
  struct A2_p_all a2;
44
} __attribute__ ((packed));
45
 
46
struct A3_p_all {
47
  double d;
48
  int i;
49
} __attribute__ ((packed));
50
 
51
struct B3_p_all {
52
  char c;
53
  struct A3_p_all a3;
54
} __attribute__ ((packed));
55
 
56
#define DESC_p_inner "packed attribute for inner"
57
struct B1_p_inner {
58
  char c;
59
  double d;
60
};
61
 
62
struct A2_p_inner {
63
  double d;
64
} __attribute__ ((packed));
65
 
66
struct B2_p_inner {
67
  char c;
68
  struct A2_p_inner a2;
69
};
70
 
71
struct A3_p_inner {
72
  double d;
73
  int i;
74
} __attribute__ ((packed));
75
 
76
struct B3_p_inner {
77
  char c;
78
  struct A3_p_inner a3;
79
};
80
 
81
#define DESC_p_outer "packed attribute for outer"
82
struct B1_p_outer {
83
  char c;
84
  double d;
85
} __attribute__ ((packed));
86
 
87
struct A2_p_outer {
88
  double d;
89
};
90
 
91
struct B2_p_outer {
92
  char c;
93
  struct A2_p_outer a2;
94
} __attribute__ ((packed));
95
 
96
struct A3_p_outer {
97
  double d;
98
  int i;
99
};
100
 
101
struct B3_p_outer {
102
  char c;
103
  struct A3_p_outer a3;
104
} __attribute__ ((packed));
105
 
106
#define DESC_a_max "maximum useful struct alignment for all"
107
struct B1_a_max {
108
  char c;
109
  double d;
110
} __attribute__ ((aligned));
111
 
112
struct A2_a_max {
113
  double d;
114
} __attribute__ ((aligned));
115
 
116
struct B2_a_max {
117
  char c;
118
  struct A2_a_max a2;
119
} __attribute__ ((aligned));
120
 
121
struct A3_a_max {
122
  double d;
123
  int i;
124
} __attribute__ ((aligned));
125
 
126
struct B3_a_max {
127
  char c;
128
  struct A3_a_max a3;
129
} __attribute__ ((aligned));
130
 
131
#define DESC_m_outer_p_inner "maximum alignment for outer, packed inner"
132
struct B1_m_outer_p_inner {
133
  char c;
134
  double d;
135
} __attribute__ ((aligned)) __attribute__ ((packed));
136
 
137
struct A2_m_outer_p_inner {
138
  double d;
139
} __attribute__ ((packed));
140
 
141
struct B2_m_outer_p_inner {
142
  char c;
143
  struct A2_m_outer_p_inner a2;
144
} __attribute__ ((aligned));
145
 
146
struct A3_m_outer_p_inner {
147
  double d;
148
  int i;
149
} __attribute__ ((packed));
150
 
151
struct B3_m_outer_p_inner {
152
  char c;
153
  struct A3_m_outer_p_inner a3;
154
} __attribute__ ((aligned));
155
 
156
#define DESC_m_inner_p_outer "maximum alignment for inner, packed outer"
157
struct B1_m_inner_p_outer {
158
  char c;
159
  double d;
160
} __attribute__ ((aligned)) __attribute__ ((packed));
161
 
162
struct A2_m_inner_p_outer {
163
  double d;
164
} __attribute__ ((aligned));
165
 
166
struct B2_m_inner_p_outer {
167
  char c;
168
  struct A2_m_inner_p_outer a2;
169
} __attribute__ ((packed));
170
 
171
struct A3_m_inner_p_outer {
172
  double d;
173
  int i;
174
} __attribute__ ((aligned));
175
 
176
struct B3_m_inner_p_outer {
177
  char c;
178
  struct A3_m_inner_p_outer a3;
179
} __attribute__ ((packed));
180
#endif

powered by: WebSVN 2.1.0

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