public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Andreas.Krakowczyk@fujitsu-siemens.com
To: gcc-gnats@gcc.gnu.org
Cc: Erwin.Unruh@fujitsu-siemens.com, Jochen.Canisius@fujitsu-siemens.com
Subject: c/3328: wrong code with Optimization '-O'
Date: Thu, 21 Jun 2001 07:26:00 -0000	[thread overview]
Message-ID: <20010621142322.4785.qmail@sourceware.cygnus.com> (raw)

>Number:         3328
>Category:       c
>Synopsis:       wrong code with Optimization '-O'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 21 07:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Krakowczyk
>Release:        gcc-3.0
>Organization:
>Environment:
sun-sparc-solaris2.8
>Description:
Strange behaviour of code, works without optimization, but not with '-O'.
Rearranging code leads to not working at all or always working.
>How-To-Repeat:
gcc -O bug5.c && ./a.out
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-unknown-content-type-c_auto_file; name="bug5.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug5.c"

Y2hhciAqYWN0ID0gMDsKaW50IGZhaWw7CmludCBwcmludChpbnQgbGluZSkgeyBpZiAoZmFpbCAh
PSAwKSBwcmludGYoImxpbmUgJWQ6IGZhaWxlZCBhdDogJXNcbiIsIGxpbmUsIGFjdCk7IH0KbWFp
bihpbnQgYXJnYywgY2hhciAqKmFyZ3YpCnsKICAgICAgICByZWdpc3RlciBpbnQgcmkwID0gMjE0
NzQ4MzY0NzsKICAgICAgICByZWdpc3RlciB1bnNpZ25lZCBzaG9ydCByUzAgPSA2NTUzNDsKICAg
ICAgICByaTAgPSByaTAgJSArK3JTMDsKICAgICAgICB7IGlmIChhY3QgPT0gKGNoYXIgKikwKSBh
Y3QgPSAicmkwID09IDMyNzY3IjsgZmFpbCA9ICEocmkwID09IDMyNzY3KTsgcHJpbnQoOSk7IH07
CiAgICAgICAgZXhpdChmYWlsKTsKfQo=


                 reply	other threads:[~2001-06-21  7: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=20010621142322.4785.qmail@sourceware.cygnus.com \
    --to=andreas.krakowczyk@fujitsu-siemens.com \
    --cc=Erwin.Unruh@fujitsu-siemens.com \
    --cc=Jochen.Canisius@fujitsu-siemens.com \
    --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: link
Be 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).