mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 08:42:24 +00:00
Add check that double and long long (both 64 bit) have same alignment.
This commit is contained in:
parent
0ea077814f
commit
20a97bb570
2 changed files with 84 additions and 81 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
(* $Id: LowLReal.Mod,v 1.6 1999/09/02 13:15:35 acken Exp $ *)
|
(* $Id: LowLReal.Mod,v 1.6 1999/09/02 13:15:35 acken Exp $ *)
|
||||||
MODULE oocLowLReal;
|
MODULE oocLowLReal;
|
||||||
|
|
||||||
|
(* ToDo. support 64 bit builds *)
|
||||||
|
|
||||||
(*
|
(*
|
||||||
LowLReal - Gives access to the underlying properties of the type LONGREAL
|
LowLReal - Gives access to the underlying properties of the type LONGREAL
|
||||||
for IEEE double-precision numbers.
|
for IEEE double-precision numbers.
|
||||||
|
|
|
||||||
|
|
@ -351,6 +351,7 @@ void testSystemDotH() {
|
||||||
assert(((char*)&s.x - (char*)&s) == MIN(alignment, sizeof(SET)), "Alignment of SET differs from alignmnet of LONGINT.");
|
assert(((char*)&s.x - (char*)&s) == MIN(alignment, sizeof(SET)), "Alignment of SET differs from alignmnet of LONGINT.");
|
||||||
assert(((char*)&p.x - (char*)&p) == addressSize, "Alignment of data pointer differs from address size.");
|
assert(((char*)&p.x - (char*)&p) == addressSize, "Alignment of data pointer differs from address size.");
|
||||||
assert(((char*)&f.x - (char*)&f) == addressSize, "Alignment of data pointer differs from address size.");
|
assert(((char*)&f.x - (char*)&f) == addressSize, "Alignment of data pointer differs from address size.");
|
||||||
|
assert(((char*)&lr.x - (char*)&lr) == ((char*)&ll.x - (char*)&ll), "Alignment of LONGREAL differs from alignment of long long.");
|
||||||
|
|
||||||
assert(sizeof(rec0) == 1, "CHAR wrapped in record aligns differently to CHAR alone.");
|
assert(sizeof(rec0) == 1, "CHAR wrapped in record aligns differently to CHAR alone.");
|
||||||
assert(sizeof(rec2) == 65, "CHAR array wrapped in record aligns differently to CHAR array alone.");
|
assert(sizeof(rec2) == 65, "CHAR array wrapped in record aligns differently to CHAR array alone.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue