public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/3328: wrong code with Optimization '-O'
@ 2001-06-21  7:26 Andreas.Krakowczyk
  0 siblings, 0 replies; only message in thread
From: Andreas.Krakowczyk @ 2001-06-21  7:26 UTC (permalink / raw)
  To: gcc-gnats; +Cc: Erwin.Unruh, Jochen.Canisius

>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=


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-21  7:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-21  7:26 c/3328: wrong code with Optimization '-O' Andreas.Krakowczyk

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).