Debian Codegraph @

gcc/testsuite/gnat.dg/strub_var.adb

raw
1 -- { dg-do compile }
2 -- { dg-options "-fstrub=strict -fdump-ipa-strubm" }
3 -- { dg-require-effective-target strub }
4
5 -- We don't read from the automatic variable, but being an automatic
6 -- variable, its presence should be enough for the procedure to get
7 -- strub enabled.
8
9 with Strub_Attr;
10 procedure Strub_Var is
11 X : Integer := 0;
12 pragma Machine_Attribute (X, "strub");
13 begin
14 X := Strub_Attr.F (0);
15 end Strub_Var;
16
17 -- { dg-final { scan-ipa-dump-times "\[(\]strub \[(\]internal\[)\]\[)\]" 1 "strubm" } }