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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr7284-1.c] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
/* Signed left-shift is implementation-defined in C89 (and see
2
   DR#081), not undefined.  Bug 7284 from Al Grant (AlGrant at
3
   myrealbox.com).  */
4
 
5
/* { dg-options "-std=c89" } */
6
 
7
extern void abort (void);
8
extern void exit (int);
9
 
10
int
11
f (int n)
12
{
13
  return (n << 24) / (1 << 23);
14
}
15
 
16
volatile int x = 128;
17
 
18
int
19
main (void)
20
{
21
  if (f(x) != -256)
22
    abort ();
23
  exit (0);
24
}

powered by: WebSVN 2.1.0

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