From 71fb00565269ddc7398243b36f4615f601135e57 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Sun, 30 May 1999 23:40:07 +0000 Subject: [PATCH] * gcc.c-torture/execute/990531-1.c: New test. From-SVN: r27261 --- gcc/testsuite/ChangeLog | 4 ++++ .../gcc.c-torture/execute/990531-1.c | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/990531-1.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d60dc9d8eb9..3b7ae933f1d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +Mon May 31 00:34:51 1999 Jeffrey A Law (law@cygnus.com) + + * gcc.c-torture/execute/990531-1.c: New test. + Thu May 27 02:38:36 1999 Franz Sirl * gcc.c-torture/compile/990527-1.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/execute/990531-1.c b/gcc/testsuite/gcc.c-torture/execute/990531-1.c new file mode 100644 index 00000000000..d5501d3a7d7 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/990531-1.c @@ -0,0 +1,23 @@ + unsigned long bad(int reg, unsigned long inWord) + { + union { + unsigned long word; + unsigned char byte[4]; + } data; + + data.word = inWord; + data.byte[reg] = 0; + + return data.word; + } + +main() +{ + /* XXX This test could be generalized. */ + if (sizeof (long) != 4) + exit (0); + + if (bad (0, 0xdeadbeef) == 0xdeadbeef) + abort (); + exit (0); +}