public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/8302: Pointer casting causes ++ to be ignored when optimizing
@ 2002-12-06 12:18 bangerth
0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2002-12-06 12:18 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jluu, yuvalk, noaml, nobody
Synopsis: Pointer casting causes ++ to be ignored when optimizing
State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Fri Dec 6 12:18:13 2002
State-Changed-Why:
There is no self-contained testcase in this report. Do you
still have it, so that we can take a look at it?
Thanks
Wolfgang
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8302
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: optimization/8302: Pointer casting causes ++ to be ignored when optimizing
@ 2002-12-10 8:34 bangerth
0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2002-12-10 8:34 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jluu, yuvalk, noaml, nobody
Synopsis: Pointer casting causes ++ to be ignored when optimizing
State-Changed-From-To: feedback->closed
State-Changed-By: bangerth
State-Changed-When: Tue Dec 10 08:34:27 2002
State-Changed-Why:
Aliasing violation, as discussed in
http://gcc.gnu.org/ml/gcc-bugs/2002-10/msg00886.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8302
^ permalink raw reply [flat|nested] 3+ messages in thread
* optimization/8302: Pointer casting causes ++ to be ignored when optimizing
@ 2002-10-21 9:46 noaml
0 siblings, 0 replies; 3+ messages in thread
From: noaml @ 2002-10-21 9:46 UTC (permalink / raw)
To: gcc-gnats; +Cc: jluu, yuvalk
>Number: 8302
>Category: optimization
>Synopsis: Pointer casting causes ++ to be ignored when optimizing
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Mon Oct 21 09:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Noam Lampert
>Release: gcc version 3.3 20021019 (experimental)
>Organization:
>Environment:
Intel 386. RH 7.3. kernel 2.4.18-3
>Description:
unsigned char *p;
unsigned char x;
....
*(*((unsigned char **)(&p)))++ = x;
as a side effect, p should be incremented. Sometimes, in optimized, it is not.
>How-To-Repeat:
gcc -O2 main.c
a.out
This source is in standard testcase format, and will call abort() upon failure.
>Fix:
Changing the code to
*(*((unsigned char **)(&p))) = x;
p += sizeof(x);
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-10 16:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-06 12:18 optimization/8302: Pointer casting causes ++ to be ignored when optimizing bangerth
-- strict thread matches above, loose matches on Subject: below --
2002-12-10 8:34 bangerth
2002-10-21 9:46 noaml
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).