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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [20000108-1.c] - Rev 826

Compare with Previous | Blame | View Log

/* Copyright (C) 2000  Free Software Foundation.
 
   by Alexandre Oliva  <oliva@lsd.ic.unicamp.br>  */
 
/* { dg-do run } */
/* { dg-options "-O3" } */
 
extern void abort (void);
 
void foo () {} /* unused, but essential to trigger the bug */
 
int main () {
  int i;
  /* use asms to prevent optimizations */
  /* i = -1; */ asm ("" : "=r" (i) : "0" (-1));
  /* i =  1; */ asm ("" : "=r" (i) : "0" (i ? 1 : 2));
  if (i != 1)
    abort();
  return 0;
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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