Changeset c0aa336 for src/tests


Ignore:
Timestamp:
Feb 6, 2017, 4:19:41 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
b4d65c7
Parents:
a362f97
Message:

third attempt at gcc attributes

Location:
src/tests
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • src/tests/.expect/64/declarationSpecifier.txt

    ra362f97 rc0aa336  
    1 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(long unsigned int __size);
     1__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(long unsigned int __size);
    22__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
    3 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void abort(void);
    4 __attribute__ ((__nonnull__(1),__nothrow__,__leaf__)) extern int atexit(void (*__func)(void));
    5 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void exit(int __status);
     3__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
     4__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));
     5__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);
    66extern int printf(const char *__restrict __format, ...);
    77volatile const short __x1__CVs_1;
     
    629629}
    630630static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi_iPPCc__1(argc, argv); }
    631 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(long unsigned int __size);
     631__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(long unsigned int __size);
    632632__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
    633 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void abort(void);
    634 __attribute__ ((__nonnull__(1),__nothrow__,__leaf__)) extern int atexit(void (*__func)(void));
    635 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void exit(int __status);
     633__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
     634__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));
     635__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);
    636636extern int printf(const char *__restrict __format, ...);
    637637static inline int invoke_main(int argc, char **argv, char **envp);
  • src/tests/.expect/64/extension.txt

    ra362f97 rc0aa336  
    1 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(long unsigned int __size);
     1__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(long unsigned int __size);
    22__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
    3 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void abort(void);
    4 __attribute__ ((__nonnull__(1),__nothrow__,__leaf__)) extern int atexit(void (*__func)(void));
    5 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void exit(int __status);
     3__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
     4__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));
     5__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);
    66extern int printf(const char *__restrict __format, ...);
    77__extension__ int __a__i_1;
     
    7777    __B__C2eE_1,
    7878};
     79__extension__ int __f__Fi___1();
     80__extension__ int i;
     81__extension__ int j;
    7982__extension__ int __fred__Fi_i__1(int __p__i_1){
    8083    int ___retval_fred__i_1;
     
    8386        __extension__ int __b__i_2;
    8487        __extension__ int __c__i_2;
     88        __extension__ int *__x__Pi_2;
     89        __extension__ int *__y__Pi_2;
     90        __extension__ int *__z__Pi_2;
    8591    };
    8692    int __i__i_2 = ((int )(__extension__ __a__i_1+__extension__ 3));
     
    94100    ((void)((_tmp_cp_ret0=__extension__ __fred__Fi_i__1(3)) , _tmp_cp_ret0));
    95101    ((void)((*((int *)(&_tmp_cp_ret0)))) /* ^?{} */);
     102    __extension__ int __mary__Fi_i__2(int __p__i_2){
     103        int ___retval_mary__i_2;
     104    }
    96105    ((void)__extension__ sizeof(3));
    97106    ((void)__extension__ (((int )(3!=((int )0))) || ((int )(4!=((int )0)))));
  • src/tests/.expect/64/gccExtensions.txt

    ra362f97 rc0aa336  
    1 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(long unsigned int __size);
     1__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(long unsigned int __size);
    22__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
    3 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void abort(void);
    4 __attribute__ ((__nonnull__(1),__nothrow__,__leaf__)) extern int atexit(void (*__func)(void));
    5 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void exit(int __status);
     3__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
     4__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));
     5__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);
    66extern int printf(const char *__restrict __format, ...);
    77extern int __x__i_1 asm ( "xx" );
     
    166166}
    167167static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return __main__Fi_iPPCc__1(argc, argv); }
    168 __attribute__ ((__malloc__,__nothrow__,__leaf__)) extern void *malloc(long unsigned int __size);
     168__attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(long unsigned int __size);
    169169__attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr);
    170 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void abort(void);
    171 __attribute__ ((__nonnull__(1),__nothrow__,__leaf__)) extern int atexit(void (*__func)(void));
    172 __attribute__ ((__noreturn__,__nothrow__,__leaf__)) extern void exit(int __status);
     170__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void);
     171__attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit(void (*__func)(void));
     172__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status);
    173173extern int printf(const char *__restrict __format, ...);
    174174static inline int invoke_main(int argc, char **argv, char **envp);
  • src/tests/Makefile.am

    ra362f97 rc0aa336  
    1111## Created On       : Sun May 31 09:08:15 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Mon Aug 15 12:24:54 2016
    14 ## Update Count     : 39
     13## Last Modified On : Mon Feb  6 16:10:43 2017
     14## Update Count     : 40
    1515###############################################################################
    1616
     
    6565        ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    6666
     67attributes : attributes.c
     68        ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     69
    6770memberCtors-ERR1: memberCtors.c
    6871        ${CC} ${CFLAGS} -DERR1 ${<} -o ${@}
  • src/tests/Makefile.in

    ra362f97 rc0aa336  
    686686        ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    687687
     688attributes : attributes.c
     689        ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     690
    688691memberCtors-ERR1: memberCtors.c
    689692        ${CC} ${CFLAGS} -DERR1 ${<} -o ${@}
  • src/tests/extension.c

    ra362f97 rc0aa336  
    77// Created On       : Mon Jul  4 20:42:43 2016
    88// Last Modified By : Peter A. Buhr
    9 // Last Modified On : Mon Jul  4 23:31:22 2016
    10 // Update Count     : 3
     9// Last Modified On : Mon Feb  6 15:44:39 2017
     10// Update Count     : 46
    1111//
    1212
    13 __extension__ int a, b, c;
     13__extension__ __extension__ int a, b, c;
    1414__extension__ struct S {
    15     __extension__ int a, b, c;
     15        __extension__ int a, b, c;
    1616};
    1717__extension__ union U {
    18     __extension__ int a, b, c;
     18        __extension__ int a, b, c;
    1919};
    2020__extension__ enum E {
    21     R, G, B,
     21        R, G, B,
    2222};
    2323__extension__ typedef int www; // typedefs are removed => no output
     24__extension__ __extension__ int f();
     25//__extension__ __extension__ asm( "nop" );
     26#ifdef __cforall
     27__extension__ __extension__ extern "C" {
     28        int i, j;
     29 }
     30#endif // __cforall
    2431
    2532__extension__ int fred( int p ) {
    26     __extension__ struct S {
    27         __extension__ int a, b, c;
    28     };
    29     int i = __extension__ a + __extension__ 3;
    30     __extension__ 3;
    31     __extension__ a;
    32     __extension__ int a, b, c;
     33        __extension__ struct S {
     34                __extension__ int a, b, c;
     35#ifdef __cforall
     36                __extension__ * int x, y, z;
     37#endif // __cforall
     38        };
     39        int i = __extension__ a + __extension__ 3;
     40        __extension__ 3;
     41        __extension__ a;
     42        __extension__ int a, b, c;
    3343
    34     __extension__ a = __extension__ b + __extension__ c;
    35     __extension__ fred( 3 );
    36     __extension__ sizeof( 3 );
    37     __extension__ (3 || 4);
    38     __extension__ __alignof__( __extension__ a );
    39     __extension__ a || __extension__ b && __extension__ c;
    40     __extension__ a > __extension__ b ? __extension__ c : __extension__ c;
    41     __extension__ a = __extension__ ( __extension__ b + __extension__ c );
    42     __extension__ a, __extension__ b, __extension__ c;
     44        __extension__ a = __extension__ b + __extension__ c;
     45        __extension__ fred( 3 );
     46        __extension__ int mary( int p ) {}
     47        __extension__ sizeof( 3 );
     48        __extension__ (3 || 4);
     49        __extension__ __alignof__( __extension__ a );
     50        __extension__ a || __extension__ b && __extension__ c;
     51        __extension__ a > __extension__ b ? __extension__ c : __extension__ c;
     52        __extension__ a = __extension__ ( __extension__ b + __extension__ c );
     53        __extension__ a, __extension__ b, __extension__ c;
    4354}
    4455
Note: See TracChangeset for help on using the changeset viewer.