repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* snames.ads-tmpl (Name_Ivdep): New pragma-related name.
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
opt14.adb
blob
61bc7313bb5ea41f379991386e6965dee1e04ce0
1
-- { dg-do run }
2
-- { dg-options "-O2" }
3
4
procedure
Opt14
is
5
6
type
Rec
is record
7
I1
,
I2
,
I3
:
Integer
;
8
end record
;
9
10
type
Ptr
is access
Rec
;
11
12
P
:
Ptr
:=
new
Rec
'(0,0,0);
13
14
procedure Sub (R : In Out Rec) is
15
begin
16
R.I3 := R.I3 - 1;
17
end;
18
19
begin
20
P.all := (1,2,3);
21
Sub (P.all);
22
if P.all /= (1,2,2) then
23
raise Program_Error;
24
end if;
25
end;