Debian Codegraph @

gcc/testsuite/g++.dg/opt/conj1.C

raw
1 // PR target/5740
2 // This testcase ICEd on SPARC -m64 because emit_group_load tried
3 // to move a DFmode register into DImode register directly.
4 // { dg-do compile }
5 // { dg-options "-O2" }
6
7 struct C
8 {
9 C (double y, double z) { __real__ x = y; __imag__ x = z; }
10 double r () const { return __real__ x; }
11 double i () const { return __imag__ x; }
12 __complex__ double x;
13 };
14
15 C conj (const C& z)
16 {
17 return C (z.r (), -z.i ());
18 }