//                               -*- Mode: C -*- 
// 
// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
//
// The contents of this file are covered under the licence agreement in the
// file "LICENCE" distributed with Cforall.
// 
// attributes.c -- 
// 
// Author           : Peter A. Buhr
// Created On       : Mon Feb  6 16:07:02 2017
// Last Modified By : Peter A. Buhr
// Last Modified On : Mon Feb  6 16:08:21 2017
// Update Count     : 2
// 


// label attribute
int la() {
  L: __attribute__(( unused )) 1;
}


// aggregate_name
struct __attribute__(( unused )) {};
struct __attribute__(( unused )) Agn1;
struct __attribute__(( unused )) Agn2 {};
enum __attribute__(( unused )) { E1 };
enum __attribute__(( unused )) Agn3;
enum __attribute__(( packed )) Agn3 { E2 };
#ifdef __CFA__
struct __attribute__(( unused )) ( int ) {};
struct __attribute__(( unused )) ( int ) {};
#endif // __CFA__


// field_declaring_list
struct Fdl {
    int f1 __attribute__(( unused ));
    int __attribute__(( unused )) f2;
    int __attribute__(( unused )) f3 __attribute__(( unused ));
    __attribute__(( unused )) int f4;
    __attribute__(( unused )) int f5 __attribute__(( unused ));
    __attribute__(( used )) int f6 __attribute__(( packed )), f7 __attribute__(( unused )) __attribute__(( unused )), __attribute__(( used )) f8 __attribute__(( unused ));
    int __attribute__(( unused ));
    int ( ( * (f9) __attribute__(( unused )) ) __attribute__(( unused )) );
};


// asm_name_opt
int f() asm( "xyz" ) __attribute__(( unused ));


// variable_declarator
const __attribute__(( used )) int vd1 __attribute__(( used )), __attribute__(( unused )) vd2;
const __attribute__(( used )) int __attribute__(( used )) * __attribute__(( used )) vd3 __attribute__(( used )), __attribute__(( unused )) (* __attribute__(( unused )) (vd4)) __attribute__(( used ));
const __attribute__(( used )) int __attribute__(( used )) vd5[5] __attribute__(( used )), __attribute__(( unused )) ((vd6)[5]) __attribute__(( used ));
const __attribute__(( used )) int __attribute__(( used )) (* __attribute__(( used )) vd7)() __attribute__(( used )), __attribute__(( unused )) ((* __attribute__(( used )) vd8)()) __attribute__(( used ));


// function_declarator
__attribute__(( unused )) int f1() __attribute__(( used ));
__attribute__(( unused )) int f1() {}
__attribute__(( unused )) int * __attribute__(( unused )) * const __attribute__(( unused )) f2() __attribute__(( used ));
__attribute__(( unused )) int * __attribute__(( unused )) * const __attribute__(( unused )) f2() {}
__attribute__(( unused )) int (* __attribute__(( unused )) f3(int))[] __attribute__(( used ));
__attribute__(( unused )) int (* __attribute__(( unused )) f3(int p))[] {}
__attribute__(( unused )) int (* __attribute__(( unused )) f4())(int) __attribute__(( used ));
__attribute__(( unused )) int (* __attribute__(( unused )) f4())(int) {}

#ifdef __CFA__
extern "C" {
#endif // __CFA__
typedef long int ptrdiff_t;
typedef long unsigned int size_t;
extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
extern int atexit0 (void (*__func) (void), void *, void *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
extern int printf (__const char *__restrict __format, ...) __attribute__ ((format (printf, 1, 2)));
#ifdef __CFA__
}
#endif // __CFA__


// variable_type_redeclarator
typedef int t1, t2, t3, t4, t5, t6, t7, t8;
int vtr() {
    // redefine typedef name in new scope
    __attribute__(( unused )) int __attribute__(( unused )) t1 __attribute__(( used ));
    __attribute__(( unused )) int __attribute__(( unused )) (* (* t2 __attribute__(( unused )) ) __attribute__(( unused )) ) __attribute__(( unused ));
    __attribute__(( unused )) int __attribute__(( unused )) t3[5] __attribute__(( unused ));
    __attribute__(( unused )) int __attribute__(( unused )) (* (* __attribute__(( unused )) t4[5]) __attribute__(( unused )) ) __attribute__(( unused ));
    __attribute__(( unused )) int __attribute__(( unused )) t5() __attribute__(( unused ));
    __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) ((t6))() __attribute__(( unused ));
}


// identifier_parameter_declarator
int ipd1( __attribute__(( unused )) int __attribute__(( unused )) p __attribute__(( unused )),
	  __attribute__(( unused )) int __attribute__(( unused )) q __attribute__(( unused )) );
int ipd1( __attribute__(( unused )) int __attribute__(( unused )) p __attribute__(( unused )),
	  __attribute__(( unused )) int __attribute__(( unused )) q __attribute__(( unused )) ) {}
int ipd2( __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) p __attribute__(( unused )),
	  __attribute__(( unused )) int __attribute__(( unused )) (* (q)) __attribute__(( unused )) );
int ipd2( __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) p __attribute__(( unused )),
	  __attribute__(( unused )) int __attribute__(( unused )) (* (q)) __attribute__(( unused )) ) {}
int ipd3( __attribute__(( unused )) int __attribute__(( unused )) p[] __attribute__(( unused )),
	  __attribute__(( unused )) int __attribute__(( unused )) ((q)[]) __attribute__(( unused )) );
int ipd3( __attribute__(( unused )) int __attribute__(( unused )) p[] __attribute__(( unused )),
	  __attribute__(( unused )) int __attribute__(( unused )) ((q)[]) __attribute__(( unused )) ) {}
int ipd4( __attribute__(( unused )) int __attribute__(( unused )) p() __attribute__(( unused )),
	  __attribute__(( unused )) int __attribute__(( unused )) ((q)()) __attribute__(( unused )) );
int ipd4( __attribute__(( unused )) int __attribute__(( unused )) p() __attribute__(( unused )),
	  __attribute__(( unused )) int __attribute__(( unused )) ((q)()) __attribute__(( unused )) ) {}


// type_parameter_redeclarator
typedef int Foo;
int tpr1( __attribute__(( unused )) int __attribute__(( unused )) Foo __attribute__(( unused )) );
int tpr2( __attribute__(( unused )) int __attribute__(( unused )) (* __attribute__(( unused )) (* __attribute__(( unused )) Foo) __attribute__(( unused )) ) __attribute__(( unused )) );
int tpr3( __attribute__(( unused )) int __attribute__(( unused )) Foo[]  __attribute__(( unused )));
int tpr4( __attribute__(( unused )) int __attribute__(( unused )) ( __attribute__(( unused )) Foo[5] __attribute__(( unused )) ) );
int tpr5( __attribute__(( unused )) int __attribute__(( unused )) (*Foo)() __attribute__(( unused )) );
int tpr6( __attribute__(( unused )) int __attribute__(( unused )) Foo() __attribute__(( unused )) );
int tpr7( __attribute__(( unused )) int __attribute__(( unused )) ( __attribute__(( unused )) Foo( __attribute__(( unused )) int __attribute__(( unused )) ) ) );


// abstract_declarator
int ad() {
    typeof( int __attribute__(( used )) ) ad1 __attribute__(( unused ));
    typeof( int __attribute__(( unused )) * __attribute__(( unused )) ) ad2 __attribute__(( unused ));
    typeof( int __attribute__(( unused )) [5] ) __attribute__(( unused )) ad3 __attribute__(( unused ));
    typeof( __attribute__(( unused )) int __attribute__(( unused )) (*)[10] __attribute__(( unused )) ) __attribute__(( unused )) ad4 __attribute__(( unused )), ad5 __attribute__(( used ));
    typeof( __attribute__(( unused )) int __attribute__(( unused )) () __attribute__(( unused )) ) __attribute__(( unused )) ad6 __attribute__(( unused ));
    sizeof( __attribute__(( unused )) int __attribute__(( unused )) );
    sizeof( __attribute__(( unused )) int __attribute__(( unused )) (* __attribute__(( unused )) (* __attribute__(( unused )) ) ) );
    sizeof( __attribute__(( unused )) int __attribute__(( unused )) [5] __attribute__(( unused )) );
    sizeof( __attribute__(( unused )) int __attribute__(( unused )) (*)[10] __attribute__(( unused )) );
    sizeof( __attribute__(( unused )) int __attribute__(( unused )) () __attribute__(( unused )) );
    sizeof( struct { int i; } __attribute__(( unused )) );
    sizeof( enum { R } __attribute__(( unused )) );
}


// abstract_parameter_declarator
int apd1( __attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )),
	__attribute__(( unused )) int __attribute__(( unused )) * __attribute__(( unused )) );
int apd2( __attribute__(( unused )) int __attribute__(( unused )) (* (* __attribute__(( unused )) ) __attribute__(( unused )) ),
	__attribute__(( unused )) int __attribute__(( unused )) (* (* __attribute__(( unused )) ) __attribute__(( unused )) ) );
int apd3( __attribute__(( unused )) int __attribute__(( unused )) ([]) __attribute__(( unused )),
	__attribute__(( unused )) int __attribute__(( unused )) ([]) __attribute__(( unused )) );
int apd4( __attribute__(( unused )) int __attribute__(( unused )) ()  __attribute__(( unused )),
	__attribute__(( unused )) int __attribute__(( unused )) ()  __attribute__(( unused )) );
int apd5( __attribute__(( unused )) int __attribute__(( unused )) (( __attribute__(( unused )) int )) __attribute__(( unused )),
	__attribute__(( unused )) int __attribute__(( unused )) ( __attribute__(( unused )) int ) __attribute__(( unused )) );
int apd6( __attribute__(( unused )) int __attribute__(( unused )) (*)()  __attribute__(( unused )),
	__attribute__(( unused )) int __attribute__(( unused )) (*)()  __attribute__(( unused )) );
int apd7( __attribute__(( unused )) int __attribute__(( unused )) ((*)( __attribute__(( unused )) int ) ) __attribute__(( unused )),
	__attribute__(( unused )) int __attribute__(( unused )) ((*)( __attribute__(( unused )) int ) ) __attribute__(( unused )) );


// variable_abstract_declarator
struct Vad {
    int __attribute__(( unused ));
    int __attribute__(( unused )) * __attribute__(( unused ));
    int __attribute__(( unused )) [10] __attribute__(( unused ));
    int __attribute__(( unused )) (*)() __attribute__(( unused ));
};

// Local Variables: //
// tab-width: 4 //
// compile-command: "cfa attributes.c" //
// End: //
