annotate gcc/testsuite/gnat.dg/opt83.adb @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 -- { dg-do compile }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 -- { dg-options "-O2" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4 -- rpo fre3 used to loop indefinitely replacing _2 with _8 and back,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 -- given MEM[(struct test__e &)_2][0]{lb: _7 sz: 16}._tag = A23s_29;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6 -- and an earlier _8 = &*_2[0]{lb: _7 sz: 16}.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 procedure Opt83 is
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 type E is tagged record
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 I : Natural := 0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 end record;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 type A is array (Natural range <>) of aliased E;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 F : E;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 R : access A;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 procedure N is
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21 begin
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22 if R = null then
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23 R := new A (0 .. 4);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24 end if;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 end N;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 begin
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
28
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
29 N;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
30
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
31 R (0) := F;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
32
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
33 end Opt83;