public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/34415] New: [4.3 Regression] Possible miscompilation on MIPS
@ 2007-12-10 0:53 tbm at cyrius dot com
2007-12-10 5:15 ` [Bug target/34415] " daney at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: tbm at cyrius dot com @ 2007-12-10 0:53 UTC (permalink / raw)
To: gcc-bugs
The mawk test suite doesn't pass when I build mawk with gcc 4.3 at
-O3 on mips. I cannot give you an isolated testcase but I've
narrowed it down so that someone with more experience can take a
look. I hope one of the two of you (David, Richard) can take a look.
Get mawk from upstream or Debian and compile it normally. If you do:
cp mawk test/mawk
cd test
./mawk -f ../examples/decl.awk mawktest.dat | cmp -s - decl-awk.out ; echo $?
cd ..
you'll see that it works.
Now do:
cd rexp
/usr/lib/gcc-snapshot/bin/gcc -g -Wall -O3 -DMAWK -I.. -c -o rexp0.o rexp0.c
cd ..
rm mawk
make mawk
and run the test above again and you'll see it fails. It fails because
the whitespace is different, e.g.
-hash: function returning unsigned (extern)
+hash: function returning unsigned (extern)
OK, we so know that something in rexp0.c doesn't work at -O3.
Unfortunately at this point I don't have enough experience to
investigate further. I found out one more thing, though. The
testsuite works again (when rexp0.c is compiled with -O3) if you
apply the following patch:
+++ rexp/rexp0.c 2007-12-07 18:54:03.000000000 +0000
@@ -68,7 +68,7 @@
/* static functions */
int PROTO(do_str, (int, char **, MACHINE *)) ;
int PROTO(do_class, (char **, MACHINE *)) ;
-static int PROTO(escape, (char **)) ;
+int PROTO(escape, (char **)) ;
static BV *PROTO(store_bvp, (BV *)) ;
static int PROTO(ctohex, (int)) ;
@@ -576,7 +576,7 @@
on entry *s -> at the character after the slash
*-------------------*/
-static int
+int
escape(start_p)
char **start_p ;
{
I hope one of you can investigate. I'm not 100% sure this is a bug
in GCC rather than in mawk, but mawk works fine on x86_64 when
compiled with -O3. I've only seen the testsuite failure on MIPS so
far.
--
Summary: [4.3 Regression] Possible miscompilation on MIPS
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tbm at cyrius dot com
GCC target triplet: mips-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34415
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34415] [4.3 Regression] Possible miscompilation on MIPS
2007-12-10 0:53 [Bug target/34415] New: [4.3 Regression] Possible miscompilation on MIPS tbm at cyrius dot com
@ 2007-12-10 5:15 ` daney at gcc dot gnu dot org
2007-12-10 5:34 ` tbm at cyrius dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-12-10 5:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from daney at gcc dot gnu dot org 2007-12-10 05:15 -------
Perhaps we could get a URL to a version of mawk that is failing.
Also details about how you configured gcc and which svn revision number you
tested, and how mawk was configured.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34415
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34415] [4.3 Regression] Possible miscompilation on MIPS
2007-12-10 0:53 [Bug target/34415] New: [4.3 Regression] Possible miscompilation on MIPS tbm at cyrius dot com
2007-12-10 5:15 ` [Bug target/34415] " daney at gcc dot gnu dot org
@ 2007-12-10 5:34 ` tbm at cyrius dot com
2007-12-10 9:52 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: tbm at cyrius dot com @ 2007-12-10 5:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tbm at cyrius dot com 2007-12-10 05:33 -------
(In reply to comment #1)
> Perhaps we could get a URL to a version of mawk that is failing.
>
> Also details about how you configured gcc and which svn revision number you
> tested, and how mawk was configured.
It's all standard Debian stuff.
apt-get source mawk will give you mawk (1.3.3-11).
apt-get install gcc-snapshot will give you a compiler based on trunk
(sid)tbm@appdev:~/src/mawk-1.3.3$ /usr/lib/gcc-snapshot/bin/gcc -v
Using built-in specs.
Target: mips-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 20071030-1'
--with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,c++,obj-c++ --prefix=/usr/lib/gcc-snapshot --enable-shared
--with-system-zlib --disable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--disable-libssp --disable-werror --build=mips-linux-gnu --host=mips-linux-gnu
--target=mips-linux-gnu
Thread model: posix
gcc version 4.3.0 20071030 (experimental) [trunk revision 127646] (Debian
20071030-1)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34415
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34415] [4.3 Regression] Possible miscompilation on MIPS
2007-12-10 0:53 [Bug target/34415] New: [4.3 Regression] Possible miscompilation on MIPS tbm at cyrius dot com
2007-12-10 5:15 ` [Bug target/34415] " daney at gcc dot gnu dot org
2007-12-10 5:34 ` tbm at cyrius dot com
@ 2007-12-10 9:52 ` rguenth at gcc dot gnu dot org
2007-12-10 18:11 ` rsandifo at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-12-10 9:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2007-12-10 09:52 -------
As of the experience with the removed 'static' keyword it is very likely that
the function where escape() is inlined to is miscompiled.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34415
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34415] [4.3 Regression] Possible miscompilation on MIPS
2007-12-10 0:53 [Bug target/34415] New: [4.3 Regression] Possible miscompilation on MIPS tbm at cyrius dot com
` (2 preceding siblings ...)
2007-12-10 9:52 ` rguenth at gcc dot gnu dot org
@ 2007-12-10 18:11 ` rsandifo at gcc dot gnu dot org
2007-12-11 10:08 ` rsandifo at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2007-12-10 18:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rsandifo at gcc dot gnu dot org 2007-12-10 18:11 -------
Confirmed.
--
rsandifo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rsandifo at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-12-10 18:11:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34415
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/34415] [4.3 Regression] Possible miscompilation on MIPS
2007-12-10 0:53 [Bug target/34415] New: [4.3 Regression] Possible miscompilation on MIPS tbm at cyrius dot com
` (3 preceding siblings ...)
2007-12-10 18:11 ` rsandifo at gcc dot gnu dot org
@ 2007-12-11 10:08 ` rsandifo at gcc dot gnu dot org
2007-12-11 16:03 ` [Bug rtl-optimization/34415] " daney at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2007-12-11 10:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rsandifo at gcc dot gnu dot org 2007-12-11 10:07 -------
This is a bug in the delayed branch scheduler. Patch here:
http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00506.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34415
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34415] [4.3 Regression] Possible miscompilation on MIPS
2007-12-10 0:53 [Bug target/34415] New: [4.3 Regression] Possible miscompilation on MIPS tbm at cyrius dot com
` (4 preceding siblings ...)
2007-12-11 10:08 ` rsandifo at gcc dot gnu dot org
@ 2007-12-11 16:03 ` daney at gcc dot gnu dot org
2007-12-16 9:54 ` rsandifo at gcc dot gnu dot org
2007-12-16 9:58 ` rsandifo at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-12-11 16:03 UTC (permalink / raw)
To: gcc-bugs
--
daney at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34415
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34415] [4.3 Regression] Possible miscompilation on MIPS
2007-12-10 0:53 [Bug target/34415] New: [4.3 Regression] Possible miscompilation on MIPS tbm at cyrius dot com
` (5 preceding siblings ...)
2007-12-11 16:03 ` [Bug rtl-optimization/34415] " daney at gcc dot gnu dot org
@ 2007-12-16 9:54 ` rsandifo at gcc dot gnu dot org
2007-12-16 9:58 ` rsandifo at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2007-12-16 9:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rsandifo at gcc dot gnu dot org 2007-12-16 09:54 -------
Subject: Bug 34415
Author: rsandifo
Date: Sun Dec 16 09:54:34 2007
New Revision: 130987
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130987
Log:
gcc/
PR rtl-optimization/34415
* df.h (DF_LR_IN, DF_LR_OUT): Update comments.
* resource.c (mark_target_live_regs): Use DF_LR_IN rather than
df_get_live_in. Don't handle pseudos.
gcc/testsuite/
PR rtl-optimization/34415
* gcc.c-torture/execute/pr34415.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr34415.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/df.h
trunk/gcc/resource.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34415
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/34415] [4.3 Regression] Possible miscompilation on MIPS
2007-12-10 0:53 [Bug target/34415] New: [4.3 Regression] Possible miscompilation on MIPS tbm at cyrius dot com
` (6 preceding siblings ...)
2007-12-16 9:54 ` rsandifo at gcc dot gnu dot org
@ 2007-12-16 9:58 ` rsandifo at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2007-12-16 9:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rsandifo at gcc dot gnu dot org 2007-12-16 09:58 -------
Fixed on trunk.
--
rsandifo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34415
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-12-16 9:58 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-10 0:53 [Bug target/34415] New: [4.3 Regression] Possible miscompilation on MIPS tbm at cyrius dot com
2007-12-10 5:15 ` [Bug target/34415] " daney at gcc dot gnu dot org
2007-12-10 5:34 ` tbm at cyrius dot com
2007-12-10 9:52 ` rguenth at gcc dot gnu dot org
2007-12-10 18:11 ` rsandifo at gcc dot gnu dot org
2007-12-11 10:08 ` rsandifo at gcc dot gnu dot org
2007-12-11 16:03 ` [Bug rtl-optimization/34415] " daney at gcc dot gnu dot org
2007-12-16 9:54 ` rsandifo at gcc dot gnu dot org
2007-12-16 9:58 ` rsandifo at gcc dot gnu dot org
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).