| 1 |
-- { dg-do compile } |
| 2 |
-- { dg-options "-fstrub=relaxed -fdump-ipa-strub" } |
| 3 |
-- { dg-require-effective-target strub } |
| 4 |
|
| 5 |
procedure Strub_Renm1 is |
| 6 |
V : Integer := 0; |
| 7 |
pragma Machine_Attribute (V, "strub"); |
| 8 |
|
| 9 |
procedure P (X : Integer); |
| 10 |
pragma Machine_Attribute (P, "strub", "at-calls"); |
| 11 |
|
| 12 |
function F return Integer; |
| 13 |
|
| 14 |
procedure Q (X : Integer) renames P; |
| 15 |
pragma Machine_Attribute (Q, "strub", "at-calls"); |
| 16 |
|
| 17 |
function G return Integer renames F; |
| 18 |
pragma Machine_Attribute (G, "strub", "internal"); |
| 19 |
|
| 20 |
procedure P (X : Integer) is null; |
| 21 |
function F return Integer is (0); |
| 22 |
|
| 23 |
begin |
| 24 |
P (F); |
| 25 |
Q (G); |
| 26 |
end Strub_Renm1; |
| 27 |
|
| 28 |
-- This is for P; Q is an alias. |
| 29 |
-- { dg-final { scan-ipa-dump-times "\[(\]strub \[(\]at-calls\[)\]\[)\]" 1 "strub" } } |
| 30 |
|
| 31 |
-- This is *not* for G, but for Strub_Renm1. |
| 32 |
-- { dg-final { scan-ipa-dump-times "\[(\]strub \[(\]wrapped\[)\]\[)\]" 1 "strub" } } |
| 33 |
-- { dg-final { scan-ipa-dump-times "\[(\]strub \[(\]wrapper\[)\]\[)\]" 1 "strub" } } |