Commit 0c0cce42 by Wolfgang Bangerth Committed by Eric Botcazou

* g++.dg/other/complex1.C: New test.

From-SVN: r92254
parent 53371c33
2004-12-16 Wolfgang Bangerth <bangerth@dealii.com>
* g++.dg/other/complex1.C: New test.
2004-12-15 Alan Modra <amodra@bigpond.net.au> 2004-12-15 Alan Modra <amodra@bigpond.net.au>
* g++.dg/opt/inline9.C: New test. * g++.dg/opt/inline9.C: New test.
......
// PR middle-end/18882
// Origin: Petr Mikulik <mikulik@physics.muni.cz>
// Testcase by Wolfgang Bangerth <bangerth@dealii.com>
// { dg-do run }
// { dg-options "" }
extern "C" void abort ();
struct C {
__complex__ long double c;
};
void foo()
{
C x = {2+2i};
int n = 1;
C y = (n==1) ? x : (C){3+3i};
if (__imag__ y.c != 2)
abort ();
}
int main(void)
{
foo ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment