Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gnat.dg / opt39.adb
blob73fb2c09b46f826c0edc70656bf9029d6d0ad50f
1 -- { dg-do compile }
2 -- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
3 -- { dg-additional-options "-cargs --param=sra-max-scalarization-size-Ospeed=32 -margs" { target aarch64-*-* hppa*-*-* powerpc*-*-* } }
5 procedure Opt39 (I : Integer) is
7 type Rec is record
8 I1 : Integer;
9 I2 : Integer;
10 I3 : Integer;
11 I4 : Integer;
12 I5 : Integer;
13 end record;
15 procedure Set (A : access Rec; I : Integer) is
16 Tmp : Rec := A.all;
17 begin
18 Tmp.I1 := I;
19 A.all := Tmp;
20 end;
22 R : aliased Rec;
24 begin
25 Set (R'Access, I);
26 if R.I1 /= I then
27 raise Program_Error;
28 end if;
29 end;
31 -- { dg-final { scan-tree-dump-not "MEM" "optimized" } }
32 -- { dg-final { scan-tree-dump-not "tmp" "optimized" } }