------- Comment #9 from rguenth at gcc dot gnu dot org 2009-02-04 12:16 -------
Testcase that is not fixed with removing the short-cutting:
int i;
long __attribute__((noinline,const)) bar(int ***p) { return (long)p; }
void __attribute__((noinline))
foo(void)
{
int *y;
int **a = &y, **x;
int ***p;
long b;
b = bar(&a);
p = (int ***)b;
x = *p;
*x = &i;
*y = 0;
}
extern void abort (void);
int main()
{
i = 1;
foo ();
if (i != 0)
abort ();
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39074