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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [builtins-61.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -ffast-math -fdump-tree-optimized" } */
3
/* { dg-require-effective-target c99_runtime } */
4
 
5
double test1 (double x)
6
{
7
  return __real __builtin_cexp(x * (__extension__ 1.0iF));
8
}
9
 
10
double test2(double x)
11
{
12
  return __imag __builtin_cexp((__extension__ 1.0iF) * x);
13
}
14
 
15
double test3(double x)
16
{
17
  _Complex c = __builtin_cexp(x * (__extension__ 1.0iF));
18
  return __imag c + __real c;
19
}
20
 
21
double test4(double x, double y)
22
{
23
  _Complex c = __builtin_cexp(x);
24
  x = __builtin_exp (x);
25
  return x - __real c;
26
}
27
 
28
/* { dg-final { scan-tree-dump "cexpi" "optimized" } } */
29
/* { dg-final { scan-tree-dump "sin" "optimized" } } */
30
/* { dg-final { scan-tree-dump "cos" "optimized" } } */
31
/* { dg-final { scan-tree-dump "return 0.0" "optimized" } } */
32
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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