strub: enable conditional support
[official-gcc.git] / gcc / testsuite / gnat.dg / strub_var1.adb
blob64b7e65fe9b0f41ccf802cd3ac5503b32a093485
1 -- { dg-do compile }
2 -- { dg-require-effective-target strub }
4 with Strub_Attr;
5 procedure Strub_Var1 is
6 type TA -- { dg-warning "does not apply to elements" }
7 is array (1..2) of Integer;
8 pragma Machine_Attribute (TA, "strub");
10 A : TA := (0, 0); -- { dg-warning "does not apply to elements" }
12 type TR is record -- { dg-warning "does not apply to fields" }
13 M, N : Integer;
14 end record;
15 pragma Machine_Attribute (TR, "strub");
17 R : TR := (0, 0);
19 begin
20 A(2) := Strub_Attr.F (A(1));
21 end Strub_Var1;