This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c/101: Re: gcc 2.95.2, bug in gcse?
- To: gcc-gnats at sourceware dot cygnus dot com
- Subject: c/101: Re: gcc 2.95.2, bug in gcse?
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sun, 12 Mar 2000 12:07:33 +0100
- References: <20000312093902.30868.qmail@d231-95.dial.mistral.co.uk>
- Resent-Cc: gcc-prs at gcc dot gnu dot org, ghouston at arglist dot com
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
>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: