OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [builtins-31.c] - Diff between revs 298 and 384

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 384
/* Copyright (C) 2004 Free Software Foundation.
/* Copyright (C) 2004 Free Software Foundation.
 
 
   Check that constant folding of signbit, signbitf and signbitl math
   Check that constant folding of signbit, signbitf and signbitl math
   functions doesn't break anything and produces the expected results.
   functions doesn't break anything and produces the expected results.
 
 
   Written by Roger Sayle, 28th January 2004.  */
   Written by Roger Sayle, 28th January 2004.  */
 
 
/* { dg-do link } */
/* { dg-do link } */
/* { dg-options "-O2" } */
/* { dg-options "-O2" } */
 
 
extern void link_error(void);
extern void link_error(void);
 
 
extern int signbit(double);
extern int signbit(double);
extern int signbitf(float);
extern int signbitf(float);
extern int signbitl(long double);
extern int signbitl(long double);
 
 
int main()
int main()
{
{
  if (signbit (1.0) != 0)
  if (signbit (1.0) != 0)
    link_error ();
    link_error ();
  if (signbit (-2.0) == 0)
  if (signbit (-2.0) == 0)
    link_error ();
    link_error ();
 
 
  if (signbitf (1.0f) != 0)
  if (signbitf (1.0f) != 0)
    link_error ();
    link_error ();
  if (signbitf (-2.0f) == 0)
  if (signbitf (-2.0f) == 0)
    link_error ();
    link_error ();
 
 
  if (signbitl (1.0l) != 0)
  if (signbitl (1.0l) != 0)
    link_error ();
    link_error ();
  if (signbitl (-2.0f) == 0)
  if (signbitl (-2.0f) == 0)
    link_error ();
    link_error ();
 
 
  return 0;
  return 0;
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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