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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr7284-1.c] - Diff between revs 297 and 338

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

Rev 297 Rev 338
/* Signed left-shift is implementation-defined in C89 (and see
/* Signed left-shift is implementation-defined in C89 (and see
   DR#081), not undefined.  Bug 7284 from Al Grant (AlGrant at
   DR#081), not undefined.  Bug 7284 from Al Grant (AlGrant at
   myrealbox.com).  */
   myrealbox.com).  */
 
 
/* { dg-options "-std=c89" } */
/* { dg-options "-std=c89" } */
 
 
extern void abort (void);
extern void abort (void);
extern void exit (int);
extern void exit (int);
 
 
int
int
f (int n)
f (int n)
{
{
  return (n << 24) / (1 << 23);
  return (n << 24) / (1 << 23);
}
}
 
 
volatile int x = 128;
volatile int x = 128;
 
 
int
int
main (void)
main (void)
{
{
  if (f(x) != -256)
  if (f(x) != -256)
    abort ();
    abort ();
  exit (0);
  exit (0);
}
}
 
 

powered by: WebSVN 2.1.0

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