public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/56023] New: [4.6 Regression]: [alpha] -fcompare-debug failure due to sched1 pass
@ 2013-01-17 22:03 ubizjak at gmail dot com
  2013-01-17 22:09 ` [Bug rtl-optimization/56023] " ubizjak at gmail dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2013-01-17 22:03 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56023
           Summary: [4.6 Regression]: [alpha] -fcompare-debug failure due
                    to sched1 pass
    Classification: Unclassified
           Product: gcc
           Version: 4.6.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ubizjak@gmail.com
              Host: x86_64-linux-gnu
            Target: alpha-linux-gnu


Following compare-debug failure breaks bootstrap on alpha-linux-gnu on 4.6:

--cut here--
void
foo (char *c)
{
  unsigned int x = 0;
  unsigned int i;

  for (i = 0; c[i]; i++)
    {
      if (i >= 5 && x != 1)
    break;
      else if (c[i] == ' ')
    x = i;
      else if (c[i] == '/' && c[i + 1] != ' ' && i)
    x = i + 1;
    }
}
--cut here--

The compare-debug failure can be reproduced on a cross to alpha-linux-gnu:

~/gcc-build-alpha/gcc/xgcc -B ~/gcc-build-alpha/gcc -O2 -fcompare-debug -S t.c
xgcc: error: t.c: -fcompare-debug failure

~/gcc-build-alpha/gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/home/uros/gcc-build-alpha/gcc/xgcc
Target: alpha-linux-gnu
Configured with: ../gcc-svn/branches/gcc-4_6-branch/configure
--target=alpha-linux-gnu
Thread model: posix
gcc version 4.6.4 20130117 (prerelease) [gcc-4_6-branch revision 195276] (GCC)

The resulting assembly differs in:

--with g--
$L8:
$LM8:
    cmpeq $5,1,$5     # 30    *setcc_internal    [length = 4]
    cmpult $8,$2,$2     # 35    *setcc_internal    [length = 4]
    cmpeq $5,0,$5     # 31    *setcc_internal    [length = 4]
(*)    addl $3,1,$3     # 43    *addsi_se/1    [length = 4]
    and $5,$2,$2     # 39    anddi3/1    [length = 4]
    cpys $f31,$f31,$f31     # 171    fnop    [length = 4]
(**)    addl $4,1,$4     # 41    *addsi_se/1    [length = 4]
    bne $2,$L1     # 44    *bcc_normal    [length = 4]
$L9:
--/with g--

--without g--
$L8:
    cmpeq $5,1,$5     # 26    *setcc_internal    [length = 4]
    cmpult $8,$2,$2     # 31    *setcc_internal    [length = 4]
    cmpeq $5,0,$5     # 27    *setcc_internal    [length = 4]
(**)    addl $4,1,$4     # 37    *addsi_se/1    [length = 4]
    and $5,$2,$2     # 35    anddi3/1    [length = 4]
    cpys $f31,$f31,$f31     # 143    fnop    [length = 4]
(*)    addl $3,1,$3     # 39    *addsi_se/1    [length = 4]
    bne $2,$L1     # 40    *bcc_normal    [length = 4]
$L9:
--/without g--

Insns (*) and (**) switched places when compiled w/ or w/o "-g".

The problem is in sched1 pass, where the first difference occurs, and adding
-fno-schedule-insns to compile flags avoids the failure.


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

end of thread, other threads:[~2013-01-21 18:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-17 22:03 [Bug rtl-optimization/56023] New: [4.6 Regression]: [alpha] -fcompare-debug failure due to sched1 pass ubizjak at gmail dot com
2013-01-17 22:09 ` [Bug rtl-optimization/56023] " ubizjak at gmail dot com
2013-01-17 22:11 ` ubizjak at gmail dot com
2013-01-17 23:00 ` ubizjak at gmail dot com
2013-01-18 10:19 ` rguenth at gcc dot gnu.org
2013-01-18 17:05 ` ubizjak at gmail dot com
2013-01-18 17:38 ` ubizjak at gmail dot com
2013-01-18 17:49 ` ubizjak at gmail dot com
2013-01-19 10:06 ` ubizjak at gmail dot com
2013-01-19 10:18 ` ubizjak at gmail dot com
2013-01-19 19:46 ` ubizjak at gmail dot com
2013-01-19 21:07 ` ubizjak at gmail dot com
2013-01-21 17:52 ` uros at gcc dot gnu.org
2013-01-21 18:00 ` uros at gcc dot gnu.org
2013-01-21 18:04 ` uros at gcc dot gnu.org
2013-01-21 18:10 ` 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).