libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / attr-section.c
blob0062b544c718e751970245d1be84c23b2a2c59ad
1 /* PR c/96126 - conflicting attribute section accepted on redeclaration
2 { dg-do compile }
3 { dg-options "-Wall" }
4 { dg-require-named-sections "" } */
6 __attribute__ ((section ("s1"))) void f1 (void);
7 __attribute__ ((section ("s2"))) void f1 (void); // { dg-warning "ignoring attribute 'section \\\(\"s2\"\\\)' because it conflicts with previous 'section \\\(\"s1\"\\\)'" }
9 __attribute__ ((section ("s3"), section ("s4")))
10 void f2 (void); // { dg-error "conflicts" }
12 __attribute__ ((section ("s5"))) __attribute ((section ("s6")))
13 void f3 (void); // { dg-error "conflicts" }