public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/7351: Postincrment optimisation problem
@ 2002-07-20 16:16 nathan
0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-07-20 16:16 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, geert.deprins, geert.deprins, nobody
Synopsis: Postincrment optimisation problem
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Sat Jul 20 16:16:54 2002
State-Changed-Why:
not a bug. Your code is undefined
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7351
^ permalink raw reply [flat|nested] 2+ messages in thread
* optimization/7351: Postincrment optimisation problem
@ 2002-07-18 10:56 geert.deprins
0 siblings, 0 replies; 2+ messages in thread
From: geert.deprins @ 2002-07-18 10:56 UTC (permalink / raw)
To: gcc-gnats; +Cc: geert.deprins
>Number: 7351
>Category: optimization
>Synopsis: Postincrment optimisation problem
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 18 10:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Geert De Prins
>Release: 3.0.3
>Organization:
>Environment:
Solaris 2.7
>Description:
Optimiser with -O2 level on seems to increment the pointer used in the source operand to early.
Sample code below (with -O2 the first character is missing):
#include <stdio.h>
void main()
{
char szBuffer[256];
char *p_cTag = szBuffer;
strcpy(szBuffer,"Testtekst");
while(*p_cTag) /* scan from start to convert to uppercase */
{
*(p_cTag++) = toupper(*p_cTag);
}
printf("Result:%s",szBuffer);
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-07-20 23:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-20 16:16 optimization/7351: Postincrment optimisation problem nathan
-- strict thread matches above, loose matches on Subject: below --
2002-07-18 10:56 geert.deprins
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).