* gcc.c-torture/execute/20020619-1.c: Correct for targets without 32 bit int.
From-SVN: r136922
This commit is contained in:
parent
8612ae05ea
commit
5d597439cb
|
@ -1,3 +1,8 @@
|
||||||
|
2008-06-18 Andy Hutchinson <hutchinsonandy@aim.com>
|
||||||
|
|
||||||
|
* gcc.c-torture/execute/20020619-1.c: Correct for targets
|
||||||
|
without 32 bit int.
|
||||||
|
|
||||||
2008-06-18 Andy Hutchinson <hutchinsonandy@aim.com>
|
2008-06-18 Andy Hutchinson <hutchinsonandy@aim.com>
|
||||||
|
|
||||||
* gcc.c-torture/execute/ieee/20000320-1.x: Skip for AVR target.
|
* gcc.c-torture/execute/ieee/20000320-1.x: Skip for AVR target.
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
static int ref(void)
|
#if (__SIZEOF_INT__ == 4)
|
||||||
|
typedef int int32;
|
||||||
|
#elif (__SIZEOF_LONG__ == 4)
|
||||||
|
typedef long int32;
|
||||||
|
#else
|
||||||
|
#error Add target support for int32
|
||||||
|
#endif
|
||||||
|
static int32 ref(void)
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
char c[5];
|
char c[5];
|
||||||
int i;
|
int32 i;
|
||||||
} u;
|
} u;
|
||||||
|
|
||||||
__builtin_memset (&u, 0, sizeof(u));
|
__builtin_memset (&u, 0, sizeof(u));
|
||||||
|
@ -16,7 +23,7 @@ static int ref(void)
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int b = ref();
|
int32 b = ref();
|
||||||
if (b != 0x01020304
|
if (b != 0x01020304
|
||||||
&& b != 0x04030201)
|
&& b != 0x04030201)
|
||||||
abort ();
|
abort ();
|
||||||
|
|
Loading…
Reference in New Issue