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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr24141.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
// reduced testcase, compile with -O2. Also, with --disable-checking
2
// gcc produces wrong code.
3
 
4
void abort (void);
5
int i;
6
 
7
void g (void)
8
{
9
  i = 1;
10
}
11
 
12
void f (int a, int b)
13
{
14
  int c = 0;
15
  if (a == 0)
16
    c = 1;
17
  if (c)
18
    return;
19
  if (c == 1)
20
    c = 0;
21
  if (b == 0)
22
    c = 1;
23
  if (c)
24
    g ();
25
}
26
 
27
int main (void)
28
{
29
  f (1, 0);
30
  if (i != 1)
31
    abort ();
32
  return 0;
33
}

powered by: WebSVN 2.1.0

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