This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc 2.95.2, bug in gcse?
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc 2.95.2, bug in gcse?
- From: Gary Houston <ghouston at arglist dot com>
- Date: 12 Mar 2000 09:39:02 -0000
This seems like a bug in gcc.
int main ()
{
long winds = 0;
while (winds != 0)
{
if (*(char *) winds)
break;
}
if (winds == 0 || winds != 0 || *(char *) winds)
abort ();
}
$ gcc -O2 bug.c
$ ./a.out
Segmentation fault
$ gcc -O2 -fno-gcse bug.c
$ ./a.out
Aborted
gcc version 2.95.2 19991024 (release), i586-pc-linux-gnu