OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [complex-3.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
/* Verify that rtl expansion cleanup doesn't get too aggressive about
2
   code dealing with complex CONCATs.  */
3
/* { dg-do run } */
4
/* { dg-options "-O -fno-tree-sra" } */
5
 
6
extern void abort (void);
7
extern void exit (int);
8
 
9
__complex__ float foo (void)
10
{
11
  __complex__ float f[1];
12
  __real__ f[0] = 1;
13
  __imag__ f[0] = 1;
14
  f[0] = __builtin_conjf (f[0]);
15
  return f[0];
16
}
17
 
18
int main (void)
19
{
20
  __complex__ double d[1];
21
  d[0] = foo ();
22
  if (__real__ d[0] != 1 || __imag__ d[0] != -1)
23
    abort ();
24
  exit (0);
25
}

powered by: WebSVN 2.1.0

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