* gcc.c-torture/execute/20001228-1.c: New test.
From-SVN: r38517
This commit is contained in:
parent
4c58589f1a
commit
bc5137ae0f
@ -1,3 +1,7 @@
|
||||
2000-12-28 Geoffrey Keating <geoffk@redhat.com>
|
||||
|
||||
* gcc.c-torture/execute/20001228-1.c: New test.
|
||||
|
||||
2000-12-28 Joseph S. Myers <jsm28@cam.ac.uk>
|
||||
|
||||
* gcc.dg/format-strfmon-1.c: New test.
|
||||
|
28
gcc/testsuite/gcc.c-torture/execute/20001228-1.c
Normal file
28
gcc/testsuite/gcc.c-torture/execute/20001228-1.c
Normal file
@ -0,0 +1,28 @@
|
||||
int foo1(void)
|
||||
{
|
||||
union {
|
||||
char a[sizeof (unsigned)];
|
||||
unsigned b;
|
||||
} u;
|
||||
|
||||
u.b = 0x01;
|
||||
return u.a[0];
|
||||
}
|
||||
|
||||
int foo2(void)
|
||||
{
|
||||
volatile union {
|
||||
char a[sizeof (unsigned)];
|
||||
unsigned b;
|
||||
} u;
|
||||
|
||||
u.b = 0x01;
|
||||
return u.a[0];
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
if (foo1() != foo2())
|
||||
abort ();
|
||||
exit (0);
|
||||
}
|
Loading…
Reference in New Issue
Block a user