Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gdc.dg / attr_section1.d
blob759b203dd449a128c5dd8be96f430ee78cac7c1d
1 // { dg-do compile }
2 // { dg-require-named-sections "" }
4 import gcc.attributes;
6 @section("types")
7 struct S {} // { dg-warning ".section. attribute does not apply to types" }
9 @attribute("section", 123)
10 int f1(); // { dg-error ".section. attribute argument not a string constant" }
12 int f2(@section("param") int a) // { dg-error "section attribute not allowed for .a." }
14 @section("local") int v; // { dg-error "section attribute cannot be specified for local variables" }
15 return a;
18 @section("c1") void conflict();
19 @section("c2") void conflict(); // { dg-error "section of .conflict. conflicts with previous declaration" }
21 @section("c3")
22 @section("c4")
23 void conflict2(); // { dg-error "section of .conflict2. conflicts with previous declaration" }