Merge aosp-toolchain/gcc/gcc-4_9 changes.
[official-gcc.git] / gcc-4_9 / gcc / testsuite / c-c++-common / attributes-1.c
blobaf4dd12275c6441f4cc4e72765f02f0dfc8a9911
1 /* { dg-do compile } */
2 /* { dg-prune-output "undeclared here \\(not in a function\\)|\[^\n\r\]* was not declared in this scope" } */
4 void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(1,bar))); /* { dg-warning "outside range" } */
5 void* my_realloc(void*, unsigned) __attribute__((alloc_size(bar))); /* { dg-warning "outside range" } */
7 typedef char vec __attribute__((vector_size(bar))); /* { dg-warning "ignored" } */
9 void f1(char*) __attribute__((nonnull(bar))); /* { dg-error "invalid operand" } */
10 void f2(char*) __attribute__((nonnull(1,bar))); /* { dg-error "invalid operand" } */
12 void g() __attribute__((aligned(bar))); /* { dg-error "invalid value|not an integer" } */
14 void foo(void);
15 void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(1,foo))); /* { dg-warning "outside range" } */
16 void* my_realloc(void*, unsigned) __attribute__((alloc_size(foo))); /* { dg-warning "outside range" } */
18 typedef char vec __attribute__((vector_size(foo))); /* { dg-warning "ignored" } */
20 void f1(char*) __attribute__((nonnull(foo))); /* { dg-error "invalid operand" } */
21 void f2(char*) __attribute__((nonnull(1,foo))); /* { dg-error "invalid operand" } */
23 void g() __attribute__((aligned(foo))); /* { dg-error "invalid value|not an integer" } */