* gcc.c-torture/execute/990531-1.c: New test.
From-SVN: r27261
This commit is contained in:
parent
6f0ef2f4db
commit
71fb005652
@ -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 <Franz.Sirl-kernel@lauterbach.com>
|
||||
|
||||
* gcc.c-torture/compile/990527-1.c: New test.
|
||||
|
23
gcc/testsuite/gcc.c-torture/execute/990531-1.c
Normal file
23
gcc/testsuite/gcc.c-torture/execute/990531-1.c
Normal file
@ -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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user