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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20030405-1.c] - Blame information for rev 715

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

Line No. Rev Author Line
1 688 jeremybenn
/* When compiled with -pedantic, this program will cause an ICE when the
2
   constant propagator tries to set the value of *str to UNDEFINED.
3
 
4
   This happens because *str is erroneously considered as a store alias.
5
   The aliasing code is then making *str an alias leader for its alias set
6
   and when the PHI node at the end of the while() is visited the first
7
   time, CCP will try to assign it a value of UNDEFINED, but the default
8
   value for *str is a constant.  */
9
typedef __SIZE_TYPE__ size_t;
10
size_t strlength (const char * const);
11
char foo();
12
 
13
static const char * const str = "mingo";
14
 
15
bar()
16
{
17
  size_t c;
18
  char *x;
19
 
20
  c = strlength (str);
21
  while (c < 10)
22
    {
23
      if (c > 5)
24
        *x = foo ();
25
      if (*x < 'a')
26
        break;
27
    }
28
 
29
  return *x == '3';
30
}

powered by: WebSVN 2.1.0

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