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-31.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
/* Copyright (C) 2004 Free Software Foundation.
2
 
3
   Check that constant folding of signbit, signbitf and signbitl math
4
   functions doesn't break anything and produces the expected results.
5
 
6
   Written by Roger Sayle, 28th January 2004.  */
7
 
8
/* { dg-do link } */
9
/* { dg-options "-O2" } */
10
 
11
extern void link_error(void);
12
 
13
extern int signbit(double);
14
extern int signbitf(float);
15
extern int signbitl(long double);
16
 
17
int main()
18
{
19
  if (signbit (1.0) != 0)
20
    link_error ();
21
  if (signbit (-2.0) == 0)
22
    link_error ();
23
 
24
  if (signbitf (1.0f) != 0)
25
    link_error ();
26
  if (signbitf (-2.0f) == 0)
27
    link_error ();
28
 
29
  if (signbitl (1.0l) != 0)
30
    link_error ();
31
  if (signbitl (-2.0f) == 0)
32
    link_error ();
33
 
34
  return 0;
35
}
36
 

powered by: WebSVN 2.1.0

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