mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 17:30:38 +02:00
* test for unaligned function
git-svn-id: trunk@3368 -
This commit is contained in:
parent
111b588950
commit
f72f9c70eb
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -5753,6 +5753,7 @@ tests/test/tstrreal1.pp svneol=native#text/plain
|
|||||||
tests/test/tstrreal2.pp svneol=native#text/plain
|
tests/test/tstrreal2.pp svneol=native#text/plain
|
||||||
tests/test/tstrreal3.pp -text
|
tests/test/tstrreal3.pp -text
|
||||||
tests/test/tsubdecl.pp svneol=native#text/plain
|
tests/test/tsubdecl.pp svneol=native#text/plain
|
||||||
|
tests/test/tunaligned1.pp svneol=native#text/plain
|
||||||
tests/test/tunit1.pp svneol=native#text/plain
|
tests/test/tunit1.pp svneol=native#text/plain
|
||||||
tests/test/tunit2.pp svneol=native#text/plain
|
tests/test/tunit2.pp svneol=native#text/plain
|
||||||
tests/test/tunit3.pp svneol=native#text/plain
|
tests/test/tunit3.pp svneol=native#text/plain
|
||||||
|
12
tests/test/tunaligned1.pp
Normal file
12
tests/test/tunaligned1.pp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
var
|
||||||
|
r1 : packed record
|
||||||
|
dummy : byte;
|
||||||
|
a,b : longint;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
r1.a:=unaligned(r1.b)*2;
|
||||||
|
unaligned(r1.a):=r1.b*2;
|
||||||
|
r1.a:=r1.b;
|
||||||
|
r1.a:=r1.b div 10;
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user