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-44.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
/* { dg-do compile } */
2
/* { dg-options "-O1 -fno-trapping-math -fdump-tree-optimized" } */
3
 
4
extern void f(int);
5
extern void link_error ();
6
 
7
extern float x;
8
extern double y;
9
extern long double z;
10
 
11
int
12
main ()
13
{
14
  double pinf = __builtin_inf ();
15
  float pinff = __builtin_inff ();
16
  long double pinfl = __builtin_infl ();
17
 
18
  if (__builtin_isinf (pinf) != 1)
19
    link_error ();
20
  if (__builtin_isinf (pinff) != 1)
21
    link_error ();
22
  if (__builtin_isinff (pinff) != 1)
23
    link_error ();
24
  if (__builtin_isinf (pinfl) != 1)
25
    link_error ();
26
  if (__builtin_isinfl (pinfl) != 1)
27
    link_error ();
28
 
29
  if (__builtin_isinf (-pinf) != -1)
30
    link_error ();
31
  if (__builtin_isinf (-pinff) != -1)
32
    link_error ();
33
  if (__builtin_isinff (-pinff) != -1)
34
    link_error ();
35
  if (__builtin_isinf (-pinfl) != -1)
36
    link_error ();
37
  if (__builtin_isinfl (-pinfl) != -1)
38
    link_error ();
39
 
40
  if (__builtin_isinf (4.0))
41
    link_error ();
42
  if (__builtin_isinf (4.0))
43
    link_error ();
44
  if (__builtin_isinff (4.0))
45
    link_error ();
46
  if (__builtin_isinf (4.0))
47
    link_error ();
48
  if (__builtin_isinfl (4.0))
49
    link_error ();
50
}
51
 
52
 
53
/* Check that all instances of link_error were subject to DCE.  */
54
/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */
55
/* { 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.