public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/6917: optimization problem in gcc 3.1
@ 2002-06-03 5:26 valera.veryazov
0 siblings, 0 replies; only message in thread
From: valera.veryazov @ 2002-06-03 5:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 6917
>Category: c
>Synopsis: optimization problem in gcc 3.1
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jun 03 05:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Valera Veryazov
>Release: gcc 3.1
>Organization:
>Environment:
Linux Mandrake 8.2
>Description:
the code is working well under gcc 3.0.4,
but give different results under gcc 3.1
with -O2 and -O1 flags.
#include <stdio.h>
void main (void)
{
char magic[8] = { 0x7f , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , 0x7f };
int *MAGIC;
MAGIC = (int *)(&magic[0]);
printf (">> %d \n",*MAGIC);
return;
}
>How-To-Repeat:
compile the code with -O2 and -O1 options for gcc 3.1
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="a.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="a.c"
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgbWFpbiAodm9pZCkKewogICBjaGFyICAgICBtYWdpY1s4
XSA9IHsgMHg3ZiAsICdBJyAsICdCJyAsICdDJyAsICdEJyAsICdFJyAsICdGJyAsIDB4N2YgfTsK
ICAgaW50ICAgICAqTUFHSUM7CiAgIE1BR0lDID0gKGludCAqKSgmbWFnaWNbMF0pOwogICBwcmlu
dGYgKCI+PiAlZCBcbiIsKk1BR0lDKTsKICAgcmV0dXJuOwp9Cg==
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-03 12:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-03 5:26 c/6917: optimization problem in gcc 3.1 valera.veryazov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).