public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: valera.veryazov@teokem.lu.se To: gcc-gnats@gcc.gnu.org Subject: c/6917: optimization problem in gcc 3.1 Date: Mon, 03 Jun 2002 05:26:00 -0000 [thread overview] Message-ID: <20020603122100.7897.qmail@sources.redhat.com> (raw) >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==
reply other threads:[~2002-06-03 12:26 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020603122100.7897.qmail@sources.redhat.com \ --to=valera.veryazov@teokem.lu.se \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).