Changeset d1b9d78 for src/tests


Ignore:
Timestamp:
Jul 13, 2016, 1:44:00 PM (9 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
9c791dd
Parents:
8884112 (diff), ed9ecda (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/tests/.expect/gccExtensions.txt

    r8884112 rd1b9d78  
    2727    }
    2828    inline void ___constructor__F_P2sS_autogen___2(struct S *___dst__P2sS_2){
    29         ((void)((*___dst__P2sS_2).__a__i_2) /* ?{} */);
    30         ((void)((*___dst__P2sS_2).__b__i_2) /* ?{} */);
    31         ((void)((*___dst__P2sS_2).__c__i_2) /* ?{} */);
     29        ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))) /* ?{} */);
     30        ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ?{} */);
     31        ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);
    3232    }
    3333    inline void ___constructor__F_P2sS2sS_autogen___2(struct S *___dst__P2sS_2, struct S ___src__2sS_2){
    34         ((void)((*___dst__P2sS_2).__a__i_2=___src__2sS_2.__a__i_2) /* ?{} */);
    35         ((void)((*___dst__P2sS_2).__b__i_2=___src__2sS_2.__b__i_2) /* ?{} */);
    36         ((void)((*___dst__P2sS_2).__c__i_2=___src__2sS_2.__c__i_2) /* ?{} */);
     34        ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=___src__2sS_2.__a__i_2) /* ?{} */);
     35        ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))=___src__2sS_2.__b__i_2) /* ?{} */);
     36        ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))=___src__2sS_2.__c__i_2) /* ?{} */);
    3737    }
    3838    inline void ___destructor__F_P2sS_autogen___2(struct S *___dst__P2sS_2){
    39         ((void)((*___dst__P2sS_2).__c__i_2) /* ^?{} */);
    40         ((void)((*___dst__P2sS_2).__b__i_2) /* ^?{} */);
    41         ((void)((*___dst__P2sS_2).__a__i_2) /* ^?{} */);
     39        ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ^?{} */);
     40        ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ^?{} */);
     41        ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))) /* ^?{} */);
    4242    }
    4343    inline void ___constructor__F_P2sSi_autogen___2(struct S *___dst__P2sS_2, int __a__i_2){
    44         ((void)((*___dst__P2sS_2).__a__i_2=__a__i_2) /* ?{} */);
    45         ((void)((*___dst__P2sS_2).__b__i_2) /* ?{} */);
    46         ((void)((*___dst__P2sS_2).__c__i_2) /* ?{} */);
     44        ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);
     45        ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ?{} */);
     46        ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);
    4747    }
    4848    inline void ___constructor__F_P2sSii_autogen___2(struct S *___dst__P2sS_2, int __a__i_2, int __b__i_2){
    49         ((void)((*___dst__P2sS_2).__a__i_2=__a__i_2) /* ?{} */);
    50         ((void)((*___dst__P2sS_2).__b__i_2=__b__i_2) /* ?{} */);
    51         ((void)((*___dst__P2sS_2).__c__i_2) /* ?{} */);
     49        ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);
     50        ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))=__b__i_2) /* ?{} */);
     51        ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);
    5252    }
    5353    inline void ___constructor__F_P2sSiii_autogen___2(struct S *___dst__P2sS_2, int __a__i_2, int __b__i_2, int __c__i_2){
    54         ((void)((*___dst__P2sS_2).__a__i_2=__a__i_2) /* ?{} */);
    55         ((void)((*___dst__P2sS_2).__b__i_2=__b__i_2) /* ?{} */);
    56         ((void)((*___dst__P2sS_2).__c__i_2=__c__i_2) /* ?{} */);
     54        ((void)((*((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);
     55        ((void)((*((int *)(&(*___dst__P2sS_2).__b__i_2)))=__b__i_2) /* ?{} */);
     56        ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))=__c__i_2) /* ?{} */);
    5757    }
    5858    int __i__i_2;
     
    9292    }
    9393    inline void ___constructor__F_P3ss2_autogen___2(struct s2 *___dst__P3ss2_2){
    94         ((void)((*___dst__P3ss2_2).__i__i_2) /* ?{} */);
     94        ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))) /* ?{} */);
    9595    }
    9696    inline void ___constructor__F_P3ss23ss2_autogen___2(struct s2 *___dst__P3ss2_2, struct s2 ___src__3ss2_2){
    97         ((void)((*___dst__P3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2) /* ?{} */);
     97        ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))=___src__3ss2_2.__i__i_2) /* ?{} */);
    9898    }
    9999    inline void ___destructor__F_P3ss2_autogen___2(struct s2 *___dst__P3ss2_2){
    100         ((void)((*___dst__P3ss2_2).__i__i_2) /* ^?{} */);
     100        ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))) /* ^?{} */);
    101101    }
    102102    inline void ___constructor__F_P3ss2i_autogen___2(struct s2 *___dst__P3ss2_2, int __i__i_2){
    103         ((void)((*___dst__P3ss2_2).__i__i_2=__i__i_2) /* ?{} */);
     103        ((void)((*((int *)(&(*___dst__P3ss2_2).__i__i_2)))=__i__i_2) /* ?{} */);
    104104    }
    105105    struct s3 {
     
    111111    }
    112112    inline void ___constructor__F_P3ss3_autogen___2(struct s3 *___dst__P3ss3_2){
    113         ((void)((*___dst__P3ss3_2).__i__i_2) /* ?{} */);
     113        ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))) /* ?{} */);
    114114    }
    115115    inline void ___constructor__F_P3ss33ss3_autogen___2(struct s3 *___dst__P3ss3_2, struct s3 ___src__3ss3_2){
    116         ((void)((*___dst__P3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2) /* ?{} */);
     116        ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))=___src__3ss3_2.__i__i_2) /* ?{} */);
    117117    }
    118118    inline void ___destructor__F_P3ss3_autogen___2(struct s3 *___dst__P3ss3_2){
    119         ((void)((*___dst__P3ss3_2).__i__i_2) /* ^?{} */);
     119        ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))) /* ^?{} */);
    120120    }
    121121    inline void ___constructor__F_P3ss3i_autogen___2(struct s3 *___dst__P3ss3_2, int __i__i_2){
    122         ((void)((*___dst__P3ss3_2).__i__i_2=__i__i_2) /* ?{} */);
     122        ((void)((*((int *)(&(*___dst__P3ss3_2).__i__i_2)))=__i__i_2) /* ?{} */);
    123123    }
    124124    struct s3 __x1__3ss3_2;
     
    136136    }
    137137    inline void ___constructor__F_P3ss4_autogen___2(struct s4 *___dst__P3ss4_2){
    138         ((void)((*___dst__P3ss4_2).__i__i_2) /* ?{} */);
     138        ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))) /* ?{} */);
    139139    }
    140140    inline void ___constructor__F_P3ss43ss4_autogen___2(struct s4 *___dst__P3ss4_2, struct s4 ___src__3ss4_2){
    141         ((void)((*___dst__P3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2) /* ?{} */);
     141        ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))=___src__3ss4_2.__i__i_2) /* ?{} */);
    142142    }
    143143    inline void ___destructor__F_P3ss4_autogen___2(struct s4 *___dst__P3ss4_2){
    144         ((void)((*___dst__P3ss4_2).__i__i_2) /* ^?{} */);
     144        ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))) /* ^?{} */);
    145145    }
    146146    inline void ___constructor__F_P3ss4i_autogen___2(struct s4 *___dst__P3ss4_2, int __i__i_2){
    147         ((void)((*___dst__P3ss4_2).__i__i_2=__i__i_2) /* ?{} */);
     147        ((void)((*((int *)(&(*___dst__P3ss4_2).__i__i_2)))=__i__i_2) /* ?{} */);
    148148    }
    149149    struct s4 __x2__3ss4_2;
  • src/tests/switch.c

    r8884112 rd1b9d78  
    1 int main(int argc, char const *argv[]) {
    2     int i;
    3     switch ( i ) case 3 : i = 1;
    4     switch ( i ) default : i = 1;
    5     switch ( 3 )
    6       default:
    7       case 2:
    8       case 3:
    9         3;
     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//
     7// switch.c --
     8//
     9// Author           : Peter A. Buhr
     10// Created On       : Tue Jul 12 06:50:22 2016
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Jul 12 18:02:23 2016
     13// Update Count     : 22
     14//
    1015
    11     switch ( i ) {
    12     }
     16int f( int i ) { return i; }
    1317
    14     switch ( i ) {
    15         int i;
    16       case 8~10:
    17       default:
    18         i = 3;
    19       case 3:
    20       case 'A' ... 'Z':
    21       case 5 ... 6:
    22       case 2, 4:
    23         i = 3;
    24         break;
    25     }
     18int main() {
     19        int i = 0;
     20        switch ( i ) case 3 : i = 1;
     21        switch ( i ) default : f( 3 );
    2622
    27     choose ( i ) case 3 : i = 1;
    28     choose ( i ) default : i = 1;
    29     choose ( i ) {
    30         int i;
    31       case 3:
    32       case 'A' ... 'Z':
    33       case 5 ... 6:
    34       case 2, 4, 7:
    35         i = 3;
    36         fallthru;
    37       default:
    38         i = 3;
    39       case 8~10:
    40         fallthru
    41     }
     23        switch ( 3 )
     24          default:
     25          case 2:
     26          case 3:
     27                f( 3 );
     28
     29        switch ( i ) {}
     30        switch ( i ) {
     31          case 3:
     32                f( 3 );
     33        } // switch
     34
     35        // switch (3 ) {
     36        //      int j;
     37        //   case 3:
     38        //      break;
     39        //   case 4:
     40        //      j = 0;
     41        // }
     42
     43        switch ( i ) {
     44                int j = 0;
     45                int k = 0;
     46                struct S { int i; };
     47                S s;
     48          case 8~10:
     49          default:
     50                i = 3;
     51          case 3:
     52          case 'A' ... 'Z':
     53          case 5 ... 6:
     54          case 2, 4:
     55                j = 3;
     56                f( 3 );
     57                break;
     58        } // switch
     59
     60        choose ( i ) case 3 : f( 3 );
     61        choose ( i ) default : i = 1;
     62
     63        choose ( 3 )
     64          case 2:
     65          default:
     66          case 3:
     67                f( 3 );
     68
     69        choose ( i ) {}
     70        choose ( i ) {
     71          case 3:
     72                f( 3 );
     73        } // choose
     74
     75        choose ( i ) {
     76                int j = 0;
     77                int k = 0;
     78                struct S { int i; };
     79                S s;
     80          case 3:
     81          case 'A' ... 'Z':
     82          case 5 ... 6:
     83          case 2, 4, 7:
     84                i = 3;
     85                f( 3 );
     86          default:
     87                j = 3;
     88          case 8~10:
     89                f( 3 );
     90                fallthru
     91          case 'd':
     92                j = 5;
     93        } // choose
    4294}
     95
     96// Local Variables: //
     97// tab-width: 4 //
     98// compile-command: "cfa switch.c" //
     99// End: //
Note: See TracChangeset for help on using the changeset viewer.