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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [builtins-52.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do link } */
2
/* { dg-options "-ffast-math" } */
3
 
4
extern void link_error(void);
5
 
6
void test(double x, int n)
7
{
8
  if (__builtin_powi(x,-1.0) != 1.0/x)
9
    link_error ();
10
  if (__builtin_powi(x,0.0) != 1.0)
11
    link_error ();
12
  if (__builtin_powi(x,1.0) != x)
13
    link_error ();
14
  if (__builtin_powi(1.0,n) != 1.0)
15
    link_error ();
16
}
17
 
18
int main()
19
{
20
  test(7.3, 2);
21
  return 0;
22
}
23
 

powered by: WebSVN 2.1.0

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