URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// PR middle-end/18882
|
// PR middle-end/18882
|
// Origin: Petr Mikulik
|
// Origin: Petr Mikulik
|
// Testcase by Wolfgang Bangerth
|
// Testcase by Wolfgang Bangerth
|
|
|
// { dg-do run }
|
// { dg-do run }
|
// { dg-options "" }
|
// { dg-options "" }
|
|
|
extern "C" void abort ();
|
extern "C" void abort ();
|
|
|
struct C {
|
struct C {
|
__complex__ long double c;
|
__complex__ long double c;
|
};
|
};
|
|
|
void foo()
|
void foo()
|
{
|
{
|
C x = {2+2i};
|
C x = {2+2i};
|
|
|
int n = 1;
|
int n = 1;
|
C y = (n==1) ? x : (C){3+3i};
|
C y = (n==1) ? x : (C){3+3i};
|
if (__imag__ y.c != 2)
|
if (__imag__ y.c != 2)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
int main(void)
|
int main(void)
|
{
|
{
|
foo ();
|
foo ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.