Debian Codegraph @

gcc/testsuite/gnat.dg/strub_var1.adb

raw
1 -- { dg-do compile }
2 -- { dg-require-effective-target strub }
3
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");
9
10 A : TA := (0, 0); -- { dg-warning "does not apply to elements" }
11
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");
16
17 R : TR := (0, 0);
18
19 begin
20 A(2) := Strub_Attr.F (A(1));
21 end Strub_Var1;