Ignore:
Timestamp:
Jun 22, 2016, 4:35:32 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, 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:
8b52686
Parents:
6bc4734
Message:

add more tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/GccExtensions.c

    r6bc4734 r10dc7491  
    1 int main(int argc, char const *argv[])
    2     asm( "nop" );
    3     __asm( "nop" );
    4     __asm__( "nop" );
     1int main(int argc, char const *argv[]) {
     2        asm( "nop" );
     3        __asm( "nop" );
     4        __asm__( "nop" );
    55
    6     __complex__ c1;
    7     _Complex c2;
     6        __complex__ c1;
     7        _Complex c2;
    88
    9     const int i1;
    10     __const int i2;
    11     __const__ int i3;
     9        const int i1;
     10        __const int i2;
     11        __const__ int i3;
    1212
    13     __extension__ const int ex;
     13        __extension__ const int ex;
     14        struct S {
     15                __extension__ int a, b, c;
     16        };
     17        int i = __extension__ 3;
     18        __extension__ int a, b, c;
     19        __extension__ a, __extension__ b, __extension__ c;
     20        __extension__ a = __extension__ b + __extension__ c;
     21        __extension__ a = __extension__ ( __extension__ b + __extension__ c );
    1422
    15     __inline int f1();
    16     __inline__ int f2();
     23        __inline int f1() {}
     24        __inline__ int f2() {}
    1725
    18     __signed s1;
    19     __signed s2;
     26        __signed s1;
     27        __signed s2;
    2028
    21     __otypeof(s1) t1;
    22     __otypeof__(s1) t2;
     29        __typeof(s1) t1;
     30        __typeof__(s1) t2;
    2331
    24     __volatile int v1;
    25     __volatile__ int v2;
     32        __volatile int v1;
     33        __volatile__ int v2;
    2634
    27     __attribute__(()) int a1;
    28     const __attribute(()) int a2;
    29     const static __attribute(()) int a3;
    30     const static int __attribute(()) a4;
    31     const static int a5 __attribute(());
    32     const static int a6, __attribute(()) a7;
     35        __attribute__(()) int a1;
     36        const __attribute(()) int a2;
     37        const static __attribute(()) int a3;
     38        const static int __attribute(()) a4;
     39        const static int a5 __attribute(());
     40        const static int a6, __attribute(()) a7;
    3341
    34     int * __attribute(()) p1;
    35     int (* __attribute(()) p2);
    36 //    int (__attribute(()) (p3));
    37 //    int ( __attribute(()) (* __attribute(()) p4));
     42        int * __attribute(()) p1;
     43        int (* __attribute(()) p2);
     44//      int (__attribute(()) (p3));
     45//      int ( __attribute(()) (* __attribute(()) p4));
    3846
    39     struct __attribute(()) s1;
    40     struct __attribute(()) s2 { int i; };
    41     struct __attribute(()) s3 { int i; } x1, __attribute(()) y1;
    42     struct __attribute(()) s4 { int i; } x2, y2 __attribute(());
     47        struct __attribute(()) s1;
     48        struct __attribute(()) s2 { int i; };
     49        struct __attribute(()) s3 { int i; } x1, __attribute(()) y1;
     50        struct __attribute(()) s4 { int i; } x2, y2 __attribute(());
    4351
    44     int m1 [10] __attribute(());
    45     int m2 [10][10] __attribute(());
    46     int __attribute(()) m3 [10][10];
    47 //    int ( __attribute(()) m4 [10] )[10];
     52        int m1 [10] __attribute(());
     53        int m2 [10][10] __attribute(());
     54        int __attribute(()) m3 [10][10];
     55//      int ( __attribute(()) m4 [10] )[10];
    4856
    4957        return 0;
Note: See TracChangeset for help on using the changeset viewer.