[Bug optimization/11536] [3.3/3.4 Regression] [strength-reduce] -O2 optimalization produces wrong code
pinskia at physics dot uc dot edu
gcc-bugzilla@gcc.gnu.org
Wed Jul 16 02:34:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11536
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-16 02:34 -------
Here is a testcase suited for the testsuite:
void f(char*,int,int) __attribute__((__noinline__));
void f(char *t,int i,int j){if(t[0]=='C')abort();}
int main()
{
int i;
int first= 0;
int last= 0;
while (last<3) {
last = first;
while(first<=last) {
first++;
for (i=0;i<3;i++){
last++;
f("A",first,last);
}
if (last>10) return 0;
f("B",first,last);
}
f("C",first,last);
}
return 0;
}
More information about the Gcc-bugs
mailing list