source: tests/variableDeclarator.cfa @ 075c6d5

Last change on this file since 075c6d5 was 53692b3, checked in by Peter A. Buhr <pabuhr@…>, 3 years ago

second attempt to fix compile-only pragma message that gcc-10/11 quote

  • Property mode set to 100644
File size: 3.5 KB
RevLine 
[5ead9f9]1//
2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
[dc8511c]7// variableDeclarator.cfa --
[5ead9f9]8//
9// Author           : Peter A. Buhr
10// Created On       : Wed Aug 17 08:41:42 2016
11// Last Modified By : Peter A. Buhr
[53692b3]12// Last Modified On : Sat Jun  5 10:08:47 2021
13// Update Count     : 14
[5ead9f9]14//
15
16// Variable declarations test
[62edde5]17int f1;
18int (f2);
19
[66812dd]20int * f3;
21int ** f4;
22int * const * f5;
[62edde5]23int * const * const f6;
24
[66812dd]25int * (f7);
26int ** (f8);
27int * const * (f9);
[62edde5]28int * const * const (f10);
29
[66812dd]30int (* f11);
31int (** f12);
32int (* const * f13);
[62edde5]33int (* const * const f14);
34
[66812dd]35int f15[0];
[62edde5]36int f16[10];
[66812dd]37int (f17[0]);
[62edde5]38int (f18[10]);
39
[66812dd]40int * f19[0];
41int * f20[10];
42int ** f21[0];
43int ** f22[10];
44int * const * f23[0];
45int * const * f24[10];
46int * const * const f25[0];
[62edde5]47int * const * const f26[10];
48
[66812dd]49int *(f27[0]);
[62edde5]50int *(f28[10]);
[66812dd]51int **(f29[0]);
[62edde5]52int **(f30[10]);
[66812dd]53int * const *(f31[0]);
[62edde5]54int * const *(f32[10]);
[66812dd]55int * const * const (f33[0]);
[62edde5]56int * const * const (f34[10]);
57
[66812dd]58int (* f35)[];
59int (* f36)[10];
60int (** f37)[];
61int (** f38)[10];
62int (* const * f39)[];
63int (* const * f40)[10];
[62edde5]64int (* const * const f41)[];
65int (* const * const f42)[10];
66
[66812dd]67int f43[0][3];
[62edde5]68int f44[3][3];
[66812dd]69int (f45[0])[3];
[62edde5]70int (f46[3])[3];
[66812dd]71int ((f47[0]))[3];
[62edde5]72int ((f48[3]))[3];
73
[66812dd]74int * f49[0][3];
75int * f50[3][3];
76int ** f51[0][3];
77int ** f52[3][3];
78int * const * f53[0][3];
79int * const * f54[3][3];
80int * const * const f55[0][3];
[62edde5]81int * const * const f56[3][3];
82
[66812dd]83int (* f57[0][3]);
84int (* f58[3][3]);
85int (** f59[0][3]);
86int (** f60[3][3]);
87int (* const * f61[0][3]);
88int (* const * f62[3][3]);
89int (* const * const f63[0][3]);
[62edde5]90int (* const * const f64[3][3]);
91
92int f65(int);
93int (f66)(int);
94
[66812dd]95int * f67(int);
96int ** f68(int);
97int * const * f69(int);
[62edde5]98int * const * const f70(int);
99
100int *(f71)(int);
101int **(f72)(int);
102int * const *(f73)(int);
103
104int * const * const (f74)(int);
105
[66812dd]106int (* f75)(int);
107int (** f76)(int);
108int (* const * f77)(int);
[62edde5]109int (* const * const f78)(int);
110
[66812dd]111int (*(* f79)(int))();
[62edde5]112int (*(* const f80)(int))();
113int (* const(* const f81)(int))();
114
115// errors
116
117//int fe0[]();                          // array of functions
118//int (fe1[])();                                // array of functions
119//int fe2()[];                          // returning an array
120//int fe3()();                          // returning a function
[66812dd]121//int (* fe4)()();                              // returning a function
122//int ((* fe5())())[];                  // returning an array
[62edde5]123
[66812dd]124#ifdef __CFA__
[62edde5]125// Cforall extensions
126
127* int cf3;
128* * int cf4;
129* const * int cf5;
130const * const * int cf6;
131
[66812dd]132[0] int cf15;
[62edde5]133[10] int cf16;
134
[66812dd]135[0] * int cf19;
[62edde5]136[10] * int cf20;
[66812dd]137int ** cf21[0];
[62edde5]138[10] * * int cf22;
[66812dd]139[0] * const * int cf23;
[62edde5]140[10] * const * int cf24;
[66812dd]141[0] const * const * int cf25;
[62edde5]142[10] const * const * int cf26;
143
144* [] int cf35;
145* [10] int cf36;
146* * [] int cf37;
147* * [10] int cf38;
148* const * [] int cf39;
149* const * [10] int cf40;
150const * const * [] int cf41;
151const * const * [10] int cf42;
152
[66812dd]153[0][3] int cf43;
[62edde5]154[3][3] int cf44;
155
[66812dd]156[0][3] * int cf49;
[62edde5]157[3][3] * int cf50;
[66812dd]158[0][3] * * int cf51;
[62edde5]159[3][3] * * int cf52;
[66812dd]160[0][3] const * int cf53;
[62edde5]161[3][3] * const * int cf54;
[66812dd]162[0][3] const * const * int cf55;
[62edde5]163[3][3] const * const * int cf56;
164
165[int] cf65(int);
166[int] cf66(int);
167
168[* int] cf67(int);
169[* * int] cf68(int);
170[const * * int] cf69(int);
171[const * const * int] cf70(int);
172
173// function pointer
174
175*[]*[]* [ *[]*[] int ]( *[]*[] int, *[]*[] int ) v3;
[66812dd]176#endif // __CFA__
[62edde5]177
178//Dummy main
[66812dd]179int main( int argc, char const * argv[] ) {
[53692b3]180    #pragma GCC warning "Compiled"                      // force non-empty .expect file, NO TABS!!!
[62edde5]181}
[5ead9f9]182
183// Local Variables: //
184// tab-width: 4 //
[dc8511c]185// compile-command: "cfa variableDeclarator.cfa" //
[5ead9f9]186// End: //
Note: See TracBrowser for help on using the repository browser.