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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20090711-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 688 jeremybenn
/* Used to be miscompiled at -O0 due to incorrect choice of sign extension
2
   vs. zero extension.  __attribute__ ((noinline)) added to try to make it
3
   fail at higher optimization levels too.  */
4
 
5
extern void abort (void);
6
 
7
long long __attribute__ ((noinline))
8
div (long long val)
9
{
10
  return val / 32768;
11
}
12
 
13
int main (void)
14
{
15
  long long d1 = -990000000;
16
  long long d2 = div(d1);
17
  if (d2 != -30212)
18
    abort ();
19
  return 0;
20
}
21
 

powered by: WebSVN 2.1.0

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