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
2017-07-25 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
unchecked_union1.adb
blob
671d0b0c7554bcdc24618f7775678432e2d6e119
1
-- { dg-do run }
2
3
procedure
Unchecked_Union1
is
4
5
type
Bit
is
(
Zero
,
One
);
6
7
type
U
(
X
:
Bit
:=
Zero
)
is record
8
case
X
is
9
when
Zero
=>
I
:
Integer
;
10
when
One
=>
F
:
Float
;
11
end case
;
12
end record
;
13
for
U
use record
14
I
at
0
range
0
..
31
;
15
F
at
0
range
0
..
31
;
16
end record
;
17
pragma
Unchecked_Union
(
U
);
18
19
begin
20
if
U
'Object_Size
/=
32
then
21
raise
Program_Error
;
22
end if
;
23
end
;