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-43.c] - Blame information for rev 867

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-gimple -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 nan = __builtin_nan ("");
15
  float nanf = __builtin_nanf ("");
16
  long double nanl = __builtin_nanl ("");
17
 
18
  if (!__builtin_isnan (nan))
19
    link_error ();
20
  if (!__builtin_isnan (nanf))
21
    link_error ();
22
  if (!__builtin_isnanf (nanf))
23
    link_error ();
24
  if (!__builtin_isnan (nanl))
25
    link_error ();
26
  if (!__builtin_isnanl (nanl))
27
    link_error ();
28
 
29
  if (__builtin_isnan (4.0))
30
    link_error ();
31
  if (__builtin_isnan (4.0))
32
    link_error ();
33
  if (__builtin_isnanf (4.0))
34
    link_error ();
35
  if (__builtin_isnan (4.0))
36
    link_error ();
37
  if (__builtin_isnanl (4.0))
38
    link_error ();
39
 
40
  f (__builtin_isnan (x));
41
  f (__builtin_isnan (y));
42
  f (__builtin_isnanf (y));
43
  f (__builtin_isnan (z));
44
  f (__builtin_isnanl (z));
45
}
46
 
47
 
48
/* Check that all instances of __builtin_isnan were folded.  */
49
/* { dg-final { scan-tree-dump-times "isnan" 0 "gimple" } } */
50
/* { dg-final { cleanup-tree-dump "gimple" } } */
51
 
52
/* Check that all instances of link_error were subject to DCE.  */
53
/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */
54
/* { 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.