This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 2.95.2, bug in gcse?
- To: Gary Houston <ghouston at arglist dot com>
- Subject: Re: gcc 2.95.2, bug in gcse?
- From: Horst von Brand <vonbrand at sleipnir dot valparaiso dot cl>
- Date: Sun, 12 Mar 2000 11:53:54 -0400
- cc: gcc-bugs at gcc dot gnu dot org
Gary Houston <ghouston@arglist.com> said:
> 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
egcs-20000306 on i686-redhat-linux gives an a.out that doesn't segfault, so
it appears that the bug was fixed in the mainline.
Thanks for the report.
--
Horst von Brand vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile +56 32 672616