OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [complex1.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR middle-end/18882
2
// Origin: Petr Mikulik 
3
// Testcase by Wolfgang Bangerth 
4
 
5
// { dg-do run }
6
// { dg-options "" }
7
 
8
extern "C" void abort ();
9
 
10
struct C {
11
  __complex__ long double c;
12
};
13
 
14
void foo()
15
{
16
  C x = {2+2i};
17
 
18
  int n = 1;
19
  C y = (n==1) ? x : (C){3+3i};
20
  if (__imag__ y.c != 2)
21
    abort ();
22
}
23
 
24
int main(void)
25
{
26
  foo ();
27
  return 0;
28
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.