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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [20031216-1.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 298 jeremybenn
/* This used to abort due to a loop bug on s390*.  */
2
 
3
/* { dg-do run } */
4
/* { dg-options "-O2" } */
5
/* { dg-options "-O2 -fPIC" { target s390*-*-* } } */
6
 
7
extern void abort (void);
8
 
9
int count = 0;
10
char *str;
11
 
12
void test (int flag)
13
{
14
  char *p;
15
 
16
  for (;;)
17
    {
18
      if (count > 5)
19
        return;
20
 
21
      p = "test";
22
 
23
      if (flag)
24
        count++;
25
 
26
      str = p;
27
    }
28
}
29
 
30
int main (void)
31
{
32
  test (1);
33
 
34
  if (str[0] != 't')
35
    abort ();
36
 
37
  return 0;
38
}
39
 

powered by: WebSVN 2.1.0

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