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
PR ipa/83051
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
misaligned_volatile.adb
blob
c76975b3ecd840efd695191574fbc99850ce4d4b
1
-- { dg-do run }
2
-- { dg-options "-gnatp -fstrict-volatile-bitfields" }
3
4
procedure
Misaligned_Volatile
is
5
6
type
Byte
is mod
2
**
8
;
7
8
type
Block
is record
9
B
:
Boolean
;
10
V
:
Byte
;
11
end record
;
12
pragma
Volatile
(
Block
);
13
pragma
Pack
(
Block
);
14
for
Block
'Alignment
use
1
;
15
16
type
Pair
is array
(
1
..
2
)
of
Block
;
17
18
P
:
Pair
;
19
begin
20
for
K
in
P
'Range
loop
21
P
(
K
).
V
:=
237
;
22
end loop
;
23
for
K
in
P
'Range
loop
24
if
P
(
K
).
V
/=
237
then
25
raise
Program_error
;
26
end if
;
27
end loop
;
28
end
;