ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since 6cbc25a was
62edde5,
checked in by Thierry Delisle <tdelisle@…>, 8 years ago
|
added new tests folder to replace existing one
|
-
Property mode set to
100644
|
File size:
696 bytes
|
Rev | Line | |
---|
[62edde5] | 1 | int x; |
---|
| 2 | typedef double y; |
---|
| 3 | typedef float t; |
---|
| 4 | y z; |
---|
| 5 | type u = struct { int a; double b; }; |
---|
| 6 | int f( int y ); |
---|
| 7 | y q; |
---|
| 8 | |
---|
| 9 | y w( y y, u v ) { |
---|
| 10 | type x | { x t(u); }; |
---|
| 11 | u u = y; |
---|
| 12 | x z = t(u); |
---|
| 13 | } |
---|
| 14 | |
---|
| 15 | y p; |
---|
| 16 | |
---|
| 17 | context has_u( type z ) { |
---|
| 18 | z u(z); |
---|
| 19 | }; |
---|
| 20 | |
---|
| 21 | forall( type t | has_u( t ) ) |
---|
| 22 | y q( t the_t ) { |
---|
| 23 | t y = u( the_t ); |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | t f( y p ) { |
---|
| 27 | int y; |
---|
| 28 | typedef char x; |
---|
| 29 | { |
---|
| 30 | x y; |
---|
| 31 | typedef x z; |
---|
| 32 | { |
---|
| 33 | z x; |
---|
| 34 | typedef z y; |
---|
| 35 | y z = x; |
---|
| 36 | } |
---|
| 37 | z x = y; |
---|
| 38 | } |
---|
| 39 | x q = y; |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | t g( void ) { |
---|
| 43 | typedef char x; |
---|
| 44 | try { |
---|
| 45 | some_func(); |
---|
| 46 | } catch ( x x ) { |
---|
| 47 | t y = x; |
---|
| 48 | } |
---|
| 49 | x z; |
---|
| 50 | } |
---|
| 51 | |
---|
| 52 | y q( i ) /* K&R style */ |
---|
| 53 | int i; |
---|
| 54 | { |
---|
| 55 | switch ( i ) { |
---|
| 56 | y q = i; |
---|
| 57 | case 0: |
---|
| 58 | return q; |
---|
| 59 | default: |
---|
| 60 | return i; |
---|
| 61 | } |
---|
| 62 | } |
---|
| 63 | |
---|
| 64 | // Local Variables: // |
---|
| 65 | // tab-width: 4 // |
---|
| 66 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.