public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/30770]  New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler
@ 2007-02-12  5:20 hjl at lucon dot org
  2007-02-12  5:21 ` [Bug target/30770] " hjl at lucon dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: hjl at lucon dot org @ 2007-02-12  5:20 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]

When I built gcc 4.3 revision 121818 with

# make bootstrap BOOT_CFLAGS="-O2 -g -pipe"

thes stage 3 compiler was miscompiled:

checking for suffix of object files... configure: error: cannot compute suffix
of object files: cannot compile
See `config.log' for more details.
make[4]: *** [configure-stage3-target-libgcc] Error 1
make[4]: Leaving directory `/export/build/gnu/gcc-test/build-x86_64-linux'
make[3]: *** [stage3-bubble] Error 2
make[3]: Leaving directory `/export/build/gnu/gcc-test/build-x86_64-linux'
make[2]: *** [bootstrap] Error 2

bash-3.1$ cat x.i
int
main ()
{
  return 0;
}
bash-3.1$ ./xgcc -B./ -S x.i -m32
x.i: In function ‘main’:
x.i:5: error: unrecognizable insn:
(insn 26 25 27 (parallel [
            (set (reg/f:SI 7 sp)
                (and:SI (reg/f:SI 7 sp)
                    (const_int -16 [0xfffffffffffffff0])))
            (clobber (reg:CC 17 flags))
        ]) -1 (nil)
    (nil))
x.i:5: internal compiler error: in insn_default_length, at insn-attrtab.c:1238
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes
                    stage 3 compiler
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl at lucon dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30770


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/30770] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler
  2007-02-12  5:20 [Bug target/30770] New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler hjl at lucon dot org
@ 2007-02-12  5:21 ` hjl at lucon dot org
  2007-02-12 21:09 ` hjl at lucon dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl at lucon dot org @ 2007-02-12  5:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl at lucon dot org  2007-02-12 05:21 -------
I also saw

bash-3.1$ make compare
Comparing stages 2 and 3
warning: ./cc1-checksum.o differs
Bootstrap comparison failure!
./tree-vrp.o differs
./tree-ssa-operands.o differs
./build/genpreds.o differs
./build/gengtype-yacc.o differs
./build/genattrtab.o differs
./tree-ssa-alias.o differs
./tree-eh.o differs
./tree-tailcall.o differs
./ipa-reference.o differs
./c-common.o differs
./sched-rgn.o differs
./dominance.o differs
./reload1.o differs
./tree-cfg.o differs
./flow.o differs
./fold-const.o differs
./gcc.o differs
./c-decl.o differs
./tree-ssa-dce.o differs
./bt-load.o differs
./tree-ssa-ter.o differs
./function.o differs
./ddg.o differs
./tree.o differs
./tree-ssa.o differs
./loop-unroll.o differs
./expmed.o differs
./df-scan.o differs
./tree-sra.o differs
./resource.o differs
./except.o differs
./predict.o differs
./tree-ssa-dse.o differs
./df-core.o differs
./cfgloopmanip.o differs
./calls.o differs
./real.o differs
./gcse.o differs
./bitmap.o differs
./c-pragma.o differs
./explow.o differs
./loop-invariant.o differs
./tree-object-size.o differs
./tree-ssa-structalias.o differs
./sched-deps.o differs
./tree-ssa-threadupdate.o differs
./pretty-print.o differs
./tree-pretty-print.o differs
./tree-ssa-sink.o differs
./df-problems.o differs
./tree-into-ssa.o differs
./lower-subreg.o differs
./caller-save.o differs
./loop-iv.o differs
./tree-nested.o differs
./combine.o differs
./tree-ssa-loop-ivopts.o differs
./c-parser.o differs
./cfgrtl.o differs
./tree-scalar-evolution.o differs
./tree-ssa-live.o differs
./ifcvt.o differs
./expr.o differs
./ipa-type-escape.o differs
./i386.o differs
./local-alloc.o differs
./tree-ssa-dom.o differs
./c-typeck.o differs
./bb-reorder.o differs
./tree-ssa-pre.o differs
./global.o differs
./see.o differs
./tree-ssa-loop-manip.o differs
./cfgcleanup.o differs
./cfgexpand.o differs
./tree-ssa-coalesce.o differs
./stor-layout.o differs
make: *** [compare] Error 1


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30770


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/30770] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler
  2007-02-12  5:20 [Bug target/30770] New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler hjl at lucon dot org
  2007-02-12  5:21 ` [Bug target/30770] " hjl at lucon dot org
@ 2007-02-12 21:09 ` hjl at lucon dot org
  2007-02-12 21:20 ` [Bug target/30770] [4.3 regression]: " belyshev at depni dot sinp dot msu dot ru
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl at lucon dot org @ 2007-02-12 21:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hjl at lucon dot org  2007-02-12 21:09 -------
I have verified that revision 119252:

http://gcc.gnu.org/ml/gcc-cvs/2006-11/msg00907.html

breaks -mtune=nocona. Jan, can you take a look? Thanks.


-- 

hjl at lucon dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30770


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/30770] [4.3 regression]: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler
  2007-02-12  5:20 [Bug target/30770] New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler hjl at lucon dot org
  2007-02-12  5:21 ` [Bug target/30770] " hjl at lucon dot org
  2007-02-12 21:09 ` hjl at lucon dot org
@ 2007-02-12 21:20 ` belyshev at depni dot sinp dot msu dot ru
  2007-02-16  2:00 ` [Bug target/30770] [4.3 regression] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled the " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2007-02-12 21:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from belyshev at depni dot sinp dot msu dot ru  2007-02-12 21:19 -------
I believe this is the same bug as pr 30778.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30770


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/30770] [4.3 regression] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled the stage 3 compiler
  2007-02-12  5:20 [Bug target/30770] New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler hjl at lucon dot org
                   ` (2 preceding siblings ...)
  2007-02-12 21:20 ` [Bug target/30770] [4.3 regression]: " belyshev at depni dot sinp dot msu dot ru
@ 2007-02-16  2:00 ` pinskia at gcc dot gnu dot org
  2007-02-23 23:29 ` h dot mth at web dot de
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-16  2:00 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.3 regression]:           |[4.3 regression]
                   |BOOT_CFLAGS="-O2 -g -       |BOOT_CFLAGS="-O2 -g -
                   |mtune=nocona" miscompiled   |mtune=nocona" miscompiled
                   |the stage 3 compiler        |the stage 3 compiler
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30770


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/30770] [4.3 regression] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled the stage 3 compiler
  2007-02-12  5:20 [Bug target/30770] New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler hjl at lucon dot org
                   ` (3 preceding siblings ...)
  2007-02-16  2:00 ` [Bug target/30770] [4.3 regression] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled the " pinskia at gcc dot gnu dot org
@ 2007-02-23 23:29 ` h dot mth at web dot de
  2007-02-24 19:10 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: h dot mth at web dot de @ 2007-02-23 23:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from h dot mth at web dot de  2007-02-23 23:29 -------
JFYI, '-O2 -march=athlon64' also fails.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30770


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/30770] [4.3 regression] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled the stage 3 compiler
  2007-02-12  5:20 [Bug target/30770] New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler hjl at lucon dot org
                   ` (4 preceding siblings ...)
  2007-02-23 23:29 ` h dot mth at web dot de
@ 2007-02-24 19:10 ` ubizjak at gmail dot com
  2007-02-24 22:54 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2007-02-24 19:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ubizjak at gmail dot com  2007-02-24 19:09 -------
(In reply to comment #2)
> I have verified that revision 119252:
> 
> http://gcc.gnu.org/ml/gcc-cvs/2006-11/msg00907.html
> breaks -mtune=nocona. Jan, can you take a look? Thanks.

Something is still wrong with unrolled_loop stringop handling.

Patch at http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01937.html and the
following patch that disables unrolled loop stringops (for nocona) bootstraps
OK for -mtune=nocona. This applies to -march=athlon64 as well.

Index: i386.c
===================================================================
--- i386.c      (revision 122286)
+++ i386.c      (working copy)
@@ -789,10 +789,10 @@
   COSTS_N_INSNS (44),                  /* cost of FSQRT instruction.  */
   {{libcall, {{12, loop_1_byte}, {-1, rep_prefix_4_byte}}},
    {libcall, {{32, loop}, {20000, rep_prefix_8_byte},
-             {100000, unrolled_loop}, {-1, libcall}}}},
+             /*{100000, unrolled_loop},*/ {-1, libcall}}}},
   {{libcall, {{6, loop_1_byte}, {48, loop}, {20480, rep_prefix_4_byte},
    {-1, libcall}}},
-   {libcall, {{24, loop}, {64, unrolled_loop},
+   {libcall, {{24, loop}, /*{64, unrolled_loop},*/
              {8192, rep_prefix_8_byte}, {-1, libcall}}}}
 };



-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ubizjak at gmail dot com
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-02-24 19:09:51
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30770


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/30770] [4.3 regression] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled the stage 3 compiler
  2007-02-12  5:20 [Bug target/30770] New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler hjl at lucon dot org
                   ` (5 preceding siblings ...)
  2007-02-24 19:10 ` ubizjak at gmail dot com
@ 2007-02-24 22:54 ` ubizjak at gmail dot com
  2007-02-24 23:29 ` uros at gcc dot gnu dot org
  2007-02-26  7:05 ` ubizjak at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2007-02-24 22:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ubizjak at gmail dot com  2007-02-24 22:54 -------
It was a typo in expand_movmem_epilogue() and expand_setmem_epilogue().
Following patch, fixes this bug and together with patch for PR target/30778
(http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01937.html) enables bootstrap for
all x86_64 targets.

2007-02-24  Uros Bizjak  <ubizjak@gmail.com>

        PR target/30770
        * config/i386/i386.md (expand_movmem_epilogue): Fix typo, mask
        count argument with 0x10, not with 0x16.
        (expand_setmem_epilogue): Ditto.

Index: i386.c
===================================================================
--- i386.c      (revision 122286)
+++ i386.c      (working copy)
@@ -13522,7 +13549,7 @@
       HOST_WIDE_INT countval = INTVAL (count);
       int offset = 0;

-      if ((countval & 0x16) && max_size > 16)
+      if ((countval & 0x10) && max_size > 16)
        {
          if (TARGET_64BIT)
            {
@@ -13675,7 +13702,7 @@
       HOST_WIDE_INT countval = INTVAL (count);
       int offset = 0;

-      if ((countval & 0x16) && max_size > 16)
+      if ((countval & 0x10) && max_size > 16)
        {
          if (TARGET_64BIT)
            {


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |30778
         AssignedTo|unassigned at gcc dot gnu   |ubizjak at gmail dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-02-24 19:09:51         |2007-02-24 22:54:35
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30770


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/30770] [4.3 regression] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled the stage 3 compiler
  2007-02-12  5:20 [Bug target/30770] New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler hjl at lucon dot org
                   ` (6 preceding siblings ...)
  2007-02-24 22:54 ` ubizjak at gmail dot com
@ 2007-02-24 23:29 ` uros at gcc dot gnu dot org
  2007-02-26  7:05 ` ubizjak at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: uros at gcc dot gnu dot org @ 2007-02-24 23:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from uros at gcc dot gnu dot org  2007-02-24 23:29 -------
Subject: Bug 30770

Author: uros
Date: Sat Feb 24 23:29:30 2007
New Revision: 122301

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122301
Log:
        PR target/30770
        * config/i386/i386.md (expand_movmem_epilogue): Fix typo, mask
        count argument with 0x10, not with 0x16.
        (expand_setmem_epilogue): Ditto.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30770


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/30770] [4.3 regression] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled the stage 3 compiler
  2007-02-12  5:20 [Bug target/30770] New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler hjl at lucon dot org
                   ` (7 preceding siblings ...)
  2007-02-24 23:29 ` uros at gcc dot gnu dot org
@ 2007-02-26  7:05 ` ubizjak at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2007-02-26  7:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from ubizjak at gmail dot com  2007-02-26 07:05 -------
Fixed in SVN.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30770


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-02-26  7:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12  5:20 [Bug target/30770] New: BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled thes stage 3 compiler hjl at lucon dot org
2007-02-12  5:21 ` [Bug target/30770] " hjl at lucon dot org
2007-02-12 21:09 ` hjl at lucon dot org
2007-02-12 21:20 ` [Bug target/30770] [4.3 regression]: " belyshev at depni dot sinp dot msu dot ru
2007-02-16  2:00 ` [Bug target/30770] [4.3 regression] BOOT_CFLAGS="-O2 -g -mtune=nocona" miscompiled the " pinskia at gcc dot gnu dot org
2007-02-23 23:29 ` h dot mth at web dot de
2007-02-24 19:10 ` ubizjak at gmail dot com
2007-02-24 22:54 ` ubizjak at gmail dot com
2007-02-24 23:29 ` uros at gcc dot gnu dot org
2007-02-26  7:05 ` ubizjak at gmail dot com

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