Changes in tests/attributes.cfa [bada452:77148b0]
- File:
-
- 1 edited
-
tests/attributes.cfa (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/attributes.cfa
rbada452 r77148b0 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // attributes.cfa -- 8 // 6 // 7 // attributes.cfa -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Mon Feb 6 16:07:02 2017 … … 12 12 // Last Modified On : Fri Dec 20 15:32:21 2024 13 13 // Update Count : 53 14 // 14 // 15 15 16 #pragma GCC diagnostic ignored "-Wattributes"17 16 18 17 // label attribute 19 18 int la() { 20 19 L: __attribute__(( unused )) 1; 21 return 1;22 20 } 23 21 … … 66 64 // function_declarator 67 65 __attribute__(( unused )) int f1() __attribute__(( used )); 68 __attribute__(( unused )) int f1() { return 1;}66 __attribute__(( unused )) int f1() {} 69 67 __attribute__(( unused )) int * __attribute__(( unused )) * const __attribute__(( unused )) f2() __attribute__(( used )); 70 __attribute__(( unused )) int * __attribute__(( unused )) * const __attribute__(( unused )) f2() { return 0p;}68 __attribute__(( unused )) int * __attribute__(( unused )) * const __attribute__(( unused )) f2() {} 71 69 __attribute__(( unused )) int (* __attribute__(( unused )) f3(int))[] __attribute__(( used )); 72 70 __attribute__(( unused )) int ( __attribute__(( unused )) * __attribute__(( unused )) f4(int))[] __attribute__(( used )); 73 __attribute__(( unused )) int (* __attribute__(( unused )) f5(int p))[] { (void)p; return 0p;}74 __attribute__(( unused )) int ( __attribute__(( unused )) * (f6)(int p))[] { (void)p; return 0p;}71 __attribute__(( unused )) int (* __attribute__(( unused )) f5(int p))[] {} 72 __attribute__(( unused )) int ( __attribute__(( unused )) * (f6)(int p))[] {} 75 73 __attribute__(( unused )) int (* __attribute__(( unused )) f7())(int) __attribute__(( used )); 76 __attribute__(( unused )) int (* __attribute__(( unused )) f8())(int) { return 0p;}77 __attribute__(( unused )) int ( __attribute__(( unused )) * f9())(int) { return 0p;}78 __attribute__(( unused )) int ( __attribute__(( unused )) * (f10)())(int) { return 0p;}74 __attribute__(( unused )) int (* __attribute__(( unused )) f8())(int) {} 75 __attribute__(( unused )) int ( __attribute__(( unused )) * f9())(int) {} 76 __attribute__(( unused )) int ( __attribute__(( unused )) * (f10)())(int) {} 79 77 80 78 81 79 // variable_type_redeclarator 82 80 typedef int t1, t2, t3, t4, t5, t6, t7, t8; 83 voidvtr() {81 int vtr() { 84 82 // redefine typedef name in new scope 85 83 __attribute__(( unused )) int __attribute__(( unused )) t1 __attribute__(( used )); … … 94 92 95 93 // identifier_parameter_declarator 96 voidipd1( __attribute__(( unused )) int __attribute__(( unused )) p __attribute__(( unused )),94 int ipd1( __attribute__(( unused )) int __attribute__(( unused )) p __attribute__(( unused )), 97 95 __attribute__(( unused )) int __attribute__(( unused )) q __attribute__(( unused )) ); 98 voidipd1( __attribute__(( unused )) int __attribute__(( unused )) p __attribute__(( unused )),96 int ipd1( __attribute__(( unused )) int __attribute__(( unused )) p __attribute__(( unused )), 99 97 __attribute__(( unused )) int __attribute__(( unused )) q __attribute__(( unused )) ) {} 100 voidipd2( __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) p __attribute__(( unused )),98 int ipd2( __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) p __attribute__(( unused )), 101 99 __attribute__(( unused )) int __attribute__(( unused )) (* (q)) __attribute__(( unused )) ); 102 voidipd2( __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) p __attribute__(( unused )),100 int ipd2( __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) p __attribute__(( unused )), 103 101 __attribute__(( unused )) int __attribute__(( unused )) (* (q)) __attribute__(( unused )) ) {} 104 voidipd3( __attribute__(( unused )) int __attribute__(( unused )) p[] __attribute__(( unused )),102 int ipd3( __attribute__(( unused )) int __attribute__(( unused )) p[] __attribute__(( unused )), 105 103 __attribute__(( unused )) int __attribute__(( unused )) ((q)[]) __attribute__(( unused )) ); 106 voidipd3( __attribute__(( unused )) int __attribute__(( unused )) p[] __attribute__(( unused )),104 int ipd3( __attribute__(( unused )) int __attribute__(( unused )) p[] __attribute__(( unused )), 107 105 __attribute__(( unused )) int __attribute__(( unused )) ((q)[]) __attribute__(( unused )) ) {} 108 voidipd4( __attribute__(( unused )) int __attribute__(( unused )) p() __attribute__(( unused )),106 int ipd4( __attribute__(( unused )) int __attribute__(( unused )) p() __attribute__(( unused )), 109 107 __attribute__(( unused )) int __attribute__(( unused )) ((q)()) __attribute__(( unused )) ); 110 voidipd4( __attribute__(( unused )) int __attribute__(( unused )) p() __attribute__(( unused )),108 int ipd4( __attribute__(( unused )) int __attribute__(( unused )) p() __attribute__(( unused )), 111 109 __attribute__(( unused )) int __attribute__(( unused )) ((q)()) __attribute__(( unused )) ) {} 112 110 … … 124 122 125 123 // abstract_declarator 126 voidad() {124 int ad() { 127 125 typeof( int __attribute__(( used )) ) ad1 __attribute__(( unused )); 128 126 typeof( int __attribute__(( unused )) * __attribute__(( unused )) ) ad2 __attribute__(( unused )); … … 159 157 // variable_abstract_declarator 160 158 struct Vad { 161 int __attribute__(( unused )) x;159 int __attribute__(( unused )); 162 160 int __attribute__(( unused )) :4; 163 161 int __attribute__(( unused )) :4, __attribute__(( unused )) :6; … … 176 174 3; 177 175 } 178 abort();179 176 } 180 177 181 178 @[ noreturn ] void mary() { 182 @[aligned( 16)] struct S { int i; };179 @[aligned(64)] struct S { int i; }; 183 180 int @[unused] i; 184 181 switch ( 3 ) { … … 190 187 3; 191 188 } 192 abort();193 189 } 194 190
Note:
See TracChangeset
for help on using the changeset viewer.