URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
|
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
|
/* { dg-options "-O -fgcse -fno-split-wide-types" } */
|
/* { dg-options "-O -fgcse -fno-split-wide-types" } */
|
|
|
extern void abort(void);
|
extern void abort(void);
|
|
|
typedef unsigned short int uint16_t;
|
typedef unsigned short int uint16_t;
|
typedef unsigned int uint32_t;
|
typedef unsigned int uint32_t;
|
typedef unsigned long long uint64_t;
|
typedef unsigned long long uint64_t;
|
|
|
typedef struct
|
typedef struct
|
{
|
{
|
uint16_t thread;
|
uint16_t thread;
|
uint16_t phase;
|
uint16_t phase;
|
} s32;
|
} s32;
|
|
|
typedef union
|
typedef union
|
{
|
{
|
uint32_t i;
|
uint32_t i;
|
s32 s;
|
s32 s;
|
} u32;
|
} u32;
|
|
|
typedef union
|
typedef union
|
{
|
{
|
uint64_t i;
|
uint64_t i;
|
u32 u;
|
u32 u;
|
} u64;
|
} u64;
|
|
|
static __attribute__((noinline))
|
static __attribute__((noinline))
|
void foo(int val)
|
void foo(int val)
|
{
|
{
|
u64 data;
|
u64 data;
|
uint32_t thread;
|
uint32_t thread;
|
|
|
data.u.i = 0x10000L;
|
data.u.i = 0x10000L;
|
thread = data.u.s.thread;
|
thread = data.u.s.thread;
|
if (val)
|
if (val)
|
abort ();
|
abort ();
|
if (thread)
|
if (thread)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
int main(void)
|
int main(void)
|
{
|
{
|
foo (0);
|
foo (0);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.