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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [builtin-convert-4.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Copyright (C) 2007  Free Software Foundation.
2
 
3
   Verify that nearbyint isn't transformed into e.g. rint or lrint
4
   when -ftrapping-math is set.
5
 
6
   Written by Kaveh ghazi, 2007-03-04.  */
7
 
8
/* { dg-do compile } */
9
/* { dg-options "-ftrapping-math -fdump-tree-original" } */
10
/* { dg-add-options c99_runtime } */
11
 
12
#include "../builtins-config.h"
13
 
14
extern void bar (long);
15
 
16
#define TESTIT(FUNC) do { \
17
  bar (__builtin_##FUNC(d)); \
18
  bar (__builtin_##FUNC##f(f)); \
19
  bar (__builtin_##FUNC##l(ld)); \
20
} while (0)
21
 
22
void __attribute__ ((__noinline__)) foo (double d, float f, long double ld)
23
{
24
  TESTIT(nearbyint);
25
}
26
 
27
int main()
28
{
29
  foo (1.0, 2.0, 3.0);
30
  return 0;
31
}
32
 
33
/* { dg-final { scan-tree-dump-times "nearbyint " 1 "original" } } */
34
/* { dg-final { scan-tree-dump-times "nearbyintf" 1 "original" } } */
35
/* { dg-final { scan-tree-dump-times "nearbyintl" 1 "original" } } */
36
/* { dg-final { cleanup-tree-dump "original" } } */

powered by: WebSVN 2.1.0

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