public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/8110: GCC 3.2: wrong code optimization with -O2
@ 2002-10-01 9:26 dyatchkov
0 siblings, 0 replies; 2+ messages in thread
From: dyatchkov @ 2002-10-01 9:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 8110
>Category: optimization
>Synopsis: GCC 3.2: wrong code optimization with -O2
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Tue Oct 01 09:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Ilia Dyatchkov
>Release: 3.2
>Organization:
>Environment:
System: SunOS 5.8 (Solaris 8)
Architecture: sparc
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: /home/username/src/gcc-3.2/configure --prefix=/home/username/usr --disable-multilib --enable-languages=c,c++,f77 --norecursion
>Description:
cc1 in spec's CINT2000 176.gcc aborts when it made by gcc 3.2 with -O2 (or higher) option. The test works correctly when we use gcc with lower optimization. The test also works after compiling by gcc 2.95.2 with -Os.
It aborts at the end of expand_expr function (in expr.c) because temp=0 (in what way?).
>How-To-Repeat:
Configure SPEC CPU2000 with following settings
ext = compsys
tune = base
iterations = 1
size = test
OPTIMIZE = -O2 // or higher
and run runspec.
Or you can make $(SPEC)/benchspec/CINT2000/176.gcc/src/ and then run (spec)cc1 for compiling $(SPEC)/benchspec/CINT2000/176.gcc/data/train/input/cp-decl.i.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: optimization/8110: GCC 3.2: wrong code optimization with -O2
@ 2002-10-01 14:19 rth
0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-10-01 14:19 UTC (permalink / raw)
To: dyatchkov, gcc-bugs, gcc-prs, nobody
Synopsis: GCC 3.2: wrong code optimization with -O2
State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Tue Oct 1 14:19:00 2002
State-Changed-Why:
The code in rtx_alloc is broken in spec2k. Use the following.
--- rtl.c.orig Tue Oct 1 14:16:34 2002
+++ rtl.c Tue Oct 1 14:17:35 2002
@@ -234,9 +234,7 @@
one int, but we don't want to assume that and it isn't very portable
anyway; this is. */
- length = (sizeof (struct rtx_def) - sizeof (rtunion) - 1) / sizeof (int);
- for (; length >= 0; length--)
- ((int *) rt)[length] = 0;
+ memset (rt, 0, sizeof (struct rtx_def) - sizeof (rtunion));
PUT_CODE (rt, code);
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8110
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-01 21:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-01 9:26 optimization/8110: GCC 3.2: wrong code optimization with -O2 dyatchkov
2002-10-01 14:19 rth
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).