This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc 2.95.2, bug in gcse?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]