URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
/* Copyright (C) 2000 Free Software Foundation.
|
/* Copyright (C) 2000 Free Software Foundation.
|
|
|
by Alexandre Oliva <oliva@lsd.ic.unicamp.br> */
|
by Alexandre Oliva <oliva@lsd.ic.unicamp.br> */
|
|
|
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-options "-O3" } */
|
/* { dg-options "-O3" } */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
|
|
void foo () {} /* unused, but essential to trigger the bug */
|
void foo () {} /* unused, but essential to trigger the bug */
|
|
|
int main () {
|
int main () {
|
int i;
|
int i;
|
/* use asms to prevent optimizations */
|
/* use asms to prevent optimizations */
|
/* i = -1; */ asm ("" : "=r" (i) : "0" (-1));
|
/* i = -1; */ asm ("" : "=r" (i) : "0" (-1));
|
/* i = 1; */ asm ("" : "=r" (i) : "0" (i ? 1 : 2));
|
/* i = 1; */ asm ("" : "=r" (i) : "0" (i ? 1 : 2));
|
if (i != 1)
|
if (i != 1)
|
abort();
|
abort();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.