diff options
author | Fariborz Jahanian <fjahanian@gcc.gnu.org> | 2003-12-22 18:37:24 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@gcc.gnu.org> | 2003-12-22 18:37:24 +0000 |
commit | fe5597f25eebf3592c6cf27fcceae20b4e752414 (patch) | |
tree | a253cd10ef25951803f5b3901f82d5d5d05ab216 /gcc | |
parent | 585de9be32f22cfbe3fcd502fbbc5494d1c6fee8 (diff) | |
download | gcc-fe5597f25eebf3592c6cf27fcceae20b4e752414.zip gcc-fe5597f25eebf3592c6cf27fcceae20b4e752414.tar.gz gcc-fe5597f25eebf3592c6cf27fcceae20b4e752414.tar.bz2 |
Test to check for a valid memory reference of a misaligned DImode memory
with -O3 -mpowerpc64.
From-SVN: r74939
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/darwin-misaligned.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/darwin-misaligned.c b/gcc/testsuite/gcc.dg/darwin-misaligned.c new file mode 100644 index 0000000..5b89f57 --- /dev/null +++ b/gcc/testsuite/gcc.dg/darwin-misaligned.c @@ -0,0 +1,32 @@ +/* { dg-do compile { target powerpc*-*-darwin* } } */ +/* { dg-options "-O2 -force_cpusubtype_ALL -mpowerpc64" } */ + +typedef struct Nlm_rect { + short sh1; + short sh2; + short sh3; + short sh4; +} S8; + +typedef struct udv_mouse_select { + short Action_type; + S8 rcClip; + int pgp; + } UDVselect; + +UDVselect ms; +int UDV(S8 rcClip); + +int main() +{ + ms.rcClip.sh1 = 1; + ms.rcClip.sh4 = 4; + return UDV(ms.rcClip); +} + +int UDV(S8 rcClip){ + + return !(rcClip.sh1 == 1 && rcClip.sh4 == 4); +} + + |