This is the mail archive of the gcc-prs@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]

c/101: Re: gcc 2.95.2, bug in gcse?



>Number:         101
>Category:       c
>Synopsis:       gcc 2.95.2, bug in gcse?
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          analyzed
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 12 10:06:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Gary Houston <ghouston@arglist.com>
>Release:        2.95.2
>Organization:
>Environment:
>Description:
 Date: 12 Mar 2000 09:39:02 -0000
 Original-Message-ID: <20000312093902.30868.qmail@d231-95.dial.mistral.co.uk>

 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

>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:

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