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
Preserving locations for variable-uses and constants (PR c++/43486)
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
opt39.adb
blob
3b12cf201ec9c22d6add13404221985bb2038217
1
-- { dg-do compile }
2
-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
3
4
procedure
Opt39
(
I
:
Integer
)
is
5
6
type
Rec
is record
7
I1
:
Integer
;
8
I2
:
Integer
;
9
I3
:
Integer
;
10
I4
:
Integer
;
11
I5
:
Integer
;
12
end record
;
13
14
procedure
Set
(
A
:
access
Rec
;
I
:
Integer
)
is
15
Tmp
:
Rec
:=
A
.
all
;
16
begin
17
Tmp
.
I1
:=
I
;
18
A
.
all
:=
Tmp
;
19
end
;
20
21
R
:
aliased
Rec
;
22
23
begin
24
Set
(
R
'Access
,
I
);
25
if
R
.
I1
/=
I
then
26
raise
Program_Error
;
27
end if
;
28
end
;
29
30
-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }