public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o
@ 2014-01-29 14:57 bernd.edlinger at hotmail dot de
  2014-01-29 15:31 ` [Bug bootstrap/59985] " rguenth at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-01-29 14:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59985
           Summary: stage2/3 compare error on lto-streamer-in.o
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bernd.edlinger at hotmail dot de

I try to boot strap this on arm-linux-gnueabihf:

../gcc-4.9-20140126/configure --prefix=/home/ed/gnu/arm-linux-gnueabihf
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go --with-arch=armv7-a
--with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard

and get a stage2/3 compare error constantly at lto-streamer-in.o
this is reproducible with gcc snapshot gcc-4.9-20140126
as well as gcc-4.9-20140112.

--- stage2.dump    2014-01-29 14:38:32.291550833 +0000
+++ stage3.dump    2014-01-29 14:38:53.595551113 +0000
@@ -1093,19 +1093,19 @@
     1084:    e58d3010     str    r3, [sp, #16]
     1088:    e2082001     and    r2, r8, #1
     108c:    e3a03000     mov    r3, #0
-    1090:    e1a08000     mov    r8, r0
+    1090:    e3a06003     mov    r6, #3
     1094:    e1cd20f8     strd    r2, [sp, #8]
-    1098:    e1a0e001     mov    lr, r1
+    1098:    e3a0c004     mov    ip, #4
     109c:    e59d3010     ldr    r3, [sp, #16]
-    10a0:    e3a06003     mov    r6, #3
-    10a4:    e3a0c004     mov    ip, #4
+    10a0:    e1a08000     mov    r8, r0
+    10a4:    e1a0e001     mov    lr, r1
     10a8:    e1833f01     orr    r3, r3, r1, lsl #30
     10ac:    e58d3010     str    r3, [sp, #16]
     10b0:    e1a03121     lsr    r3, r1, #2
     10b4:    e58d3014     str    r3, [sp, #20]
-    10b8:    e3a03000     mov    r3, #0
-    10bc:    e1cd01d0     ldrd    r0, [sp, #16]
-    10c0:    e2002001     and    r2, r0, #1
+    10b8:    e1cd21d0     ldrd    r2, [sp, #16]
+    10bc:    e3a03000     mov    r3, #0
+    10c0:    e2022001     and    r2, r2, #1
     10c4:    e1cd21f0     strd    r2, [sp, #16]
     10c8:    ea000009     b    10f4
<_Z18lto_input_locationP9bitpack_dP7data_in+0x230>
     10cc:    e5940010     ldr    r0, [r4, #16]


This seems to happen because stage2 uses -gtoggle and stage3 does not.

I see the first difference in lto-streamer-in.c.234r.sched2:

stage2:
(insn 484 475 485 17 (set (reg:SI 2 r2 [orig:118 D.60233 ] [118])
        (and:SI (reg:SI 8 r8 [orig:256 valD.60190 ] [256])
            (const_int 1 [0x1])))
../../gcc-4.9-20140126/gcc/data-streamer.h:172 80 {*arm_andsi3_insn}
     (expr_list:REG_DEAD (reg:SI 8 r8 [orig:256 valD.60190 ] [256])
        (nil)))
(insn:TI 485 484 348 17 (set (reg:SI 3 r3 [ D.60233+4 ])
        (const_int 0 [0])) ../../gcc-4.9-20140126/gcc/data-streamer.h:172 663
{*arm_movsi_vfp}
     (nil))
(insn 348 485 461 17 (set (reg:SI 8 r8 [orig:270 D.60233 ] [270])
        (reg:SI 0 r0 [orig:140 valD.60184 ] [140]))
../../gcc-4.9-20140126/gcc/data-streamer.h:172 663 {*arm_movsi_vfp}
     (expr_list:REG_DEAD (reg:SI 0 r0 [orig:140 valD.60184 ] [140])
        (nil)))
(insn:TI 461 348 349 17 (set (mem/c:DI (plus:SI (reg/f:SI 13 sp)
                (const_int 8 [0x8])) [180 %sfpD.60006+-48 S8 A64])
        (reg:DI 2 r2 [orig:118 D.60233 ] [118]))
../../gcc-4.9-20140126/gcc/data-streamer.h:172 665 {*movdi_vfp}
     (expr_list:REG_DEAD (reg:DI 2 r2 [orig:118 D.60233 ] [118])
        (nil)))

stage3:
(insn 622 613 623 17 (set (reg:SI 2 r2 [orig:118 D.60549 ] [118])
        (and:SI (reg:SI 8 r8 [orig:256 valD.60503 ] [256])
            (const_int 1 [0x1])))
../../gcc-4.9-20140126/gcc/data-streamer.h:172 80 {*arm_andsi3_insn}
     (expr_list:REG_DEAD (reg:SI 8 r8 [orig:256 valD.60503 ] [256])
        (nil)))
(insn:TI 623 622 438 17 (set (reg:SI 3 r3 [ D.60549+4 ])
        (const_int 0 [0])) ../../gcc-4.9-20140126/gcc/data-streamer.h:172 663
{*arm_movsi_vfp}
     (nil))
(insn 438 623 598 17 (set (reg/v:SI 6 r6 [orig:113 posD.60516 ] [113])
        (const_int 3 [0x3])) 663 {*arm_movsi_vfp}
     (nil))
(insn:TI 598 438 428 17 (set (mem/c:DI (plus:SI (reg/f:SI 13 sp)
                (const_int 8 [0x8])) [180 %sfpD.60308+-48 S8 A64])
        (reg:DI 2 r2 [orig:118 D.60549 ] [118]))
../../gcc-4.9-20140126/gcc/data-streamer.h:172 665 {*movdi_vfp}
     (expr_list:REG_DEAD (reg:DI 2 r2 [orig:118 D.60549 ] [118])
        (nil)))


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
@ 2014-01-29 15:31 ` rguenth at gcc dot gnu.org
  2014-01-30  7:40 ` bernd.edlinger at hotmail dot de
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-01-29 15:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
does it work if you configure with --without-build-config?  (thus, disable
bootstrap-debug)


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
  2014-01-29 15:31 ` [Bug bootstrap/59985] " rguenth at gcc dot gnu.org
@ 2014-01-30  7:40 ` bernd.edlinger at hotmail dot de
  2014-01-30  7:58 ` jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-01-30  7:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Richard Biener from comment #1)
> does it work if you configure with --without-build-config?  (thus, disable
> bootstrap-debug)

Ok with this option, stage 2 is not compiled with -gtoggle, and the check
skipped?

I will give it a try, but it will take a few days before I have results.

It is however quite likely that it will work, because both assembler
variants are equivalent, only some instructions moved, and the stage 2
has an intermediate result in [r0,r1] but it is not used afterwards.

What I tried before was this:

I copied the command-lines which build lto-streamer-in.o in stage 2 and 3
in a batch file, and played with them.

Both stage1-gcc/xg++ and stage2-gcc/xg++ produce different output dependent
on the -gtoggle option, but only with this single file.
If the same command line is used the output is identical.

-fdump-tree-all-all and -fdump-rtl-all-all have no influence.


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
  2014-01-29 15:31 ` [Bug bootstrap/59985] " rguenth at gcc dot gnu.org
  2014-01-30  7:40 ` bernd.edlinger at hotmail dot de
@ 2014-01-30  7:58 ` jakub at gcc dot gnu.org
  2014-01-30  8:19 ` bernd.edlinger at hotmail dot de
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-30  7:58 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Can you just cut'n'paste from build log command line to compile
lto-streamer-in.o and rerun it by hand with -fcompare-debug?


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (2 preceding siblings ...)
  2014-01-30  7:58 ` jakub at gcc dot gnu.org
@ 2014-01-30  8:19 ` bernd.edlinger at hotmail dot de
  2014-01-30  8:22 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-01-30  8:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Jakub Jelinek from comment #3)
> Can you just cut'n'paste from build log command line to compile
> lto-streamer-in.o and rerun it by hand with -fcompare-debug?

the build step from stage 3 (without -gtoggle) prints:
xg++: error: ../../gcc-4.9-20140126/gcc/lto-streamer-in.c: -fcompare-debug
failure (length)


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (3 preceding siblings ...)
  2014-01-30  8:19 ` bernd.edlinger at hotmail dot de
@ 2014-01-30  8:22 ` jakub at gcc dot gnu.org
  2014-01-30  8:54 ` bernd.edlinger at hotmail dot de
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-30  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Bernd Edlinger from comment #4)
> (In reply to Jakub Jelinek from comment #3)
> > Can you just cut'n'paste from build log command line to compile
> > lto-streamer-in.o and rerun it by hand with -fcompare-debug?
> 
> the build step from stage 3 (without -gtoggle) prints:
> xg++: error: ../../gcc-4.9-20140126/gcc/lto-streamer-in.c: -fcompare-debug
> failure (length)

Then please change -c into -S and attach the preprocessed lto-streamer-in.ii
here, plus mention all the command line options, so that it can be analysed
even using cross-compilers.


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (4 preceding siblings ...)
  2014-01-30  8:22 ` jakub at gcc dot gnu.org
@ 2014-01-30  8:54 ` bernd.edlinger at hotmail dot de
  2014-01-30 12:20 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-01-30  8:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Created attachment 31989
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31989&action=edit
compiler output for stage 2 and 3

here the used compiler options:

ed@w-ed:~/gnu$ cat test.sh 
echo stage2
cd /home/ed/gnu/gcc-build-arm-linux-gnueabihf/./stage2-gcc
/home/ed/gnu/gcc-build-arm-linux-gnueabihf/./stage1-gcc/xg++
-B/home/ed/gnu/gcc-build-arm-linux-gnueabihf/./stage1-gcc/
-B/home/ed/gnu/arm-linux-gnueabihf/armv7l-unknown-linux-gnueabihf/bin/
-nostdinc++
-B/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage1-armv7l-unknown-linux-gnueabihf/libstdc++-v3/src/.libs
-B/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage1-armv7l-unknown-linux-gnueabihf/libstdc++-v3/libsupc++/.libs
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage1-armv7l-unknown-linux-gnueabihf/libstdc++-v3/include/armv7l-unknown-linux-gnueabihf
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage1-armv7l-unknown-linux-gnueabihf/libstdc++-v3/include
-I/home/ed/gnu/gcc-4.9-20140126/libstdc++-v3/libsupc++
-L/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage1-armv7l-unknown-linux-gnueabihf/libstdc++-v3/src/.libs
-L/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage1-armv7l-unknown-linux-gnueabihf/libstdc++-v3/libsupc++/.libs
-S   -g -O2 -gtoggle -DIN_GCC    -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 
-DHAVE_CONFIG_H -I. -I. -I../../gcc-4.9-20140126/gcc
-I../../gcc-4.9-20140126/gcc/. -I../../gcc-4.9-20140126/gcc/../include
-I../../gcc-4.9-20140126/gcc/../libcpp/include
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf/./stage2-gmp
-I/home/ed/gnu/gcc-4.9-20140126/gmp
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf/./stage2-mpfr
-I/home/ed/gnu/gcc-4.9-20140126/mpfr -I/home/ed/gnu/gcc-4.9-20140126/mpc/src 
-I../../gcc-4.9-20140126/gcc/../libdecnumber
-I../../gcc-4.9-20140126/gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc-4.9-20140126/gcc/../libbacktrace    -o lto-streamer-in.s -MT
lto-streamer-in.o -MMD -MP -MF ./.deps/lto-streamer-in.TPo
../../gcc-4.9-20140126/gcc/lto-streamer-in.c -save-temps
echo stage3
cd /home/ed/gnu/gcc-build-arm-linux-gnueabihf/./stage3-gcc
/home/ed/gnu/gcc-build-arm-linux-gnueabihf/./stage2-gcc/xg++
-B/home/ed/gnu/gcc-build-arm-linux-gnueabihf/./stage2-gcc/
-B/home/ed/gnu/arm-linux-gnueabihf/armv7l-unknown-linux-gnueabihf/bin/
-nostdinc++
-B/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage2-armv7l-unknown-linux-gnueabihf/libstdc++-v3/src/.libs
-B/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage2-armv7l-unknown-linux-gnueabihf/libstdc++-v3/libsupc++/.libs
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage2-armv7l-unknown-linux-gnueabihf/libstdc++-v3/include/armv7l-unknown-linux-gnueabihf
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage2-armv7l-unknown-linux-gnueabihf/libstdc++-v3/include
-I/home/ed/gnu/gcc-4.9-20140126/libstdc++-v3/libsupc++
-L/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage2-armv7l-unknown-linux-gnueabihf/libstdc++-v3/src/.libs
-L/home/ed/gnu/gcc-build-arm-linux-gnueabihf/stage2-armv7l-unknown-linux-gnueabihf/libstdc++-v3/libsupc++/.libs
-S   -g -O2 -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.9-20140126/gcc
-I../../gcc-4.9-20140126/gcc/. -I../../gcc-4.9-20140126/gcc/../include
-I../../gcc-4.9-20140126/gcc/../libcpp/include
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf/./stage3-gmp
-I/home/ed/gnu/gcc-4.9-20140126/gmp
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf/./stage3-mpfr
-I/home/ed/gnu/gcc-4.9-20140126/mpfr -I/home/ed/gnu/gcc-4.9-20140126/mpc/src 
-I../../gcc-4.9-20140126/gcc/../libdecnumber
-I../../gcc-4.9-20140126/gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc-4.9-20140126/gcc/../libbacktrace    -o lto-streamer-in.s -MT
lto-streamer-in.o -MMD -MP -MF ./.deps/lto-streamer-in.TPo
../../gcc-4.9-20140126/gcc/lto-streamer-in.c -save-temps


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (5 preceding siblings ...)
  2014-01-30  8:54 ` bernd.edlinger at hotmail dot de
@ 2014-01-30 12:20 ` jakub at gcc dot gnu.org
  2014-01-30 13:40 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-30 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-01-30
   Target Milestone|---                         |4.9.0
     Ever confirmed|0                           |1

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Somewhat reduced testcase for:
-g -O2 -fcompare-debug -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16
-mfloat-abi=hard

extern void *f1 (unsigned long, unsigned long);
extern const struct line_map *f2 (void *, int, unsigned int, const char *,
unsigned int);
extern unsigned int f3 (void *, unsigned int);
extern void *v1;
struct B { const char *s; int t; };
struct C { unsigned u; unsigned long long v; void *w; };
unsigned long long f4 (struct C *);
const char *f5 (void *, unsigned int, unsigned int *);
unsigned long long f6 (void *);

static inline unsigned long long
f7 (struct C *x, unsigned y)
{
  unsigned long long a, b;
  int u = x->u;
  a = y == 64 ? -1ULL : (1ULL << y) - 1;
  if (u + y > 64)
    {
      f6 (x->w);
      x->u = y;
      return b & a;
    }
  b = x->v;
  b >>= u;
  x->u = u + y;
  return b & a;
}

static const char *
f8 (const char *x)
{
  B **a;
  unsigned long t = __builtin_strlen (x);
  char *b;
  struct B *c;
  b = (char *) f1 (t + 1, 1);
  c = (struct B *) f1 (1, sizeof (struct B));
  __builtin_memcpy (b, x, t + 1);
  c->t = t;
  struct B *d = *a;
  return d->s;
}

unsigned int
f9 (struct C *x, void *y)
{
  static const char *a;
  static int b;
  static int c;
  bool d, e, f;
  unsigned t;
  bool prev_file = a != __null;
  if (f7 (x, 1))
    return ((unsigned int) 0);
  d = f7 (x, 1);
  e = f7 (x, 1);
  f = f7 (x, 1);
  a = f8 (f5 (y, f4 (x), &t));
  if (e) b = f4 (x);
  if (f)
    if (d)
      if (prev_file)
        f2 (v1, 1, false, __null, 0);
  return f3 (v1, c);
}


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (6 preceding siblings ...)
  2014-01-30 12:20 ` jakub at gcc dot gnu.org
@ 2014-01-30 13:40 ` jakub at gcc dot gnu.org
  2014-01-30 15:55 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-30 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Weird, with --param min-nondebug-insn-uid=10000 it doesn't reproduce, something
deciding based on INSN_UID?


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (7 preceding siblings ...)
  2014-01-30 13:40 ` jakub at gcc dot gnu.org
@ 2014-01-30 15:55 ` jakub at gcc dot gnu.org
  2014-01-30 17:02 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-30 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems it is LRA where things change.  First of all, with -g there is an extra
-  151: r0:SI=r151:SI
+    Split reuse change 151->260:
+   77: debug b => r260:SI
+ 10150: r0:SI=r151:SI
message in -fdump-rtl-reload-details dump (obviously, insn numbers are
different).
But, even when comparing say -g --param min-nondebug-insn-uid=100 dump with
-g --param min-nondebug-insn-uid=1000 dump I see more important change:
-        Choosing alt 4 in insn 336:  (0) &r  (1) 0  (2) De {*anddi3_insn}
-      Creating newreg=262 from oldreg=249, assigning class GENERAL_REGS to
r262
-  336: r262:DI=r262:DI&0x1
+        Choosing alt 5 in insn 10224:  (0) &r  (1) r  (2) De {*anddi3_insn}
+      Creating newreg=262 from oldreg=231, assigning class GENERAL_REGS to
r262
+ 10224: r249:DI=r262:DI&0x1


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (8 preceding siblings ...)
  2014-01-30 15:55 ` jakub at gcc dot gnu.org
@ 2014-01-30 17:02 ` jakub at gcc dot gnu.org
  2014-01-30 17:19 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-30 17:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It seems the reason for the different chosen alternative for the last
anddi3_insn is reload_sum.  overall, losers and reload_nregs are the same
for nalt 4 and 5, 4 is currently best alternative in both cases, but reload_sum
is in one case 0 and in one case 1.
bb_reload_num is 13 in one case and 14 in the other case, while last_reload is
14 in both cases.


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (9 preceding siblings ...)
  2014-01-30 17:02 ` jakub at gcc dot gnu.org
@ 2014-01-30 17:19 ` jakub at gcc dot gnu.org
  2014-01-30 17:50 ` vmakarov at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-30 17:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/lra-constraints.c.jj    2014-01-24 16:27:35.000000000 +0100
+++ gcc/lra-constraints.c    2014-01-30 18:10:03.795737809 +0100
@@ -4049,7 +4049,7 @@ lra_constraints (bool first_p)
       curr_insn = lra_pop_insn ();
       --new_min_len;
       curr_bb = BLOCK_FOR_INSN (curr_insn);
-      if (curr_bb != last_bb)
+      if (curr_bb != last_bb && !DEBUG_INSN_P (curr_insn))
     {
       last_bb = curr_bb;
       bb_reload_num = lra_curr_reload_num;

seems to fix this.  Vlad, what do you think about that?
last_bb is only used to determine bb_reload_num computation, and bb_reload_num
is only used in process_alt_operands which is called from curr_insn_transform
and never called for DEBUG_INSNs, so in order to ensure that bb_reload_num is
set the same, we shouldn't set it for DEBUG_INSN_Ps which will not appear
without -g.
And, DEBUG_INSN processing in lra_constraint I think shouldn't care about
bb_reload_num value.


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (10 preceding siblings ...)
  2014-01-30 17:19 ` jakub at gcc dot gnu.org
@ 2014-01-30 17:50 ` vmakarov at gcc dot gnu.org
  2014-01-31 13:12 ` bernd.edlinger at hotmail dot de
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-01-30 17:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #11)
> --- gcc/lra-constraints.c.jj	2014-01-24 16:27:35.000000000 +0100
> +++ gcc/lra-constraints.c	2014-01-30 18:10:03.795737809 +0100
> @@ -4049,7 +4049,7 @@ lra_constraints (bool first_p)
>        curr_insn = lra_pop_insn ();
>        --new_min_len;
>        curr_bb = BLOCK_FOR_INSN (curr_insn);
> -      if (curr_bb != last_bb)
> +      if (curr_bb != last_bb && !DEBUG_INSN_P (curr_insn))
>  	{
>  	  last_bb = curr_bb;
>  	  bb_reload_num = lra_curr_reload_num;
> 
> seems to fix this.  Vlad, what do you think about that?
> last_bb is only used to determine bb_reload_num computation, and
> bb_reload_num is only used in process_alt_operands which is called from
> curr_insn_transform and never called for DEBUG_INSNs, so in order to ensure
> that bb_reload_num is set the same, we shouldn't set it for DEBUG_INSN_Ps
> which will not appear without -g.
> And, DEBUG_INSN processing in lra_constraint I think shouldn't care about
> bb_reload_num value.

May be the patch fixes the testcase but in general it might now work as the
order of the insns on the stack sometimes might be different from the original
one.  I'll try to make another patch.
>From gcc-bugs-return-442070-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jan 30 18:28:45 2014
Return-Path: <gcc-bugs-return-442070-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16499 invoked by alias); 30 Jan 2014 18:28:44 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 16444 invoked by uid 48); 30 Jan 2014 18:28:40 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/59993] [4.9 Regression] ICE: SSA corruption
Date: Thu, 30 Jan 2014 18:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-59993-4-ieAB9ZFhRv@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59993-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59993-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-01/txt/msg03212.txt.bz2
Content-length: 427

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY993

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (11 preceding siblings ...)
  2014-01-30 17:50 ` vmakarov at gcc dot gnu.org
@ 2014-01-31 13:12 ` bernd.edlinger at hotmail dot de
  2014-01-31 23:57 ` vmakarov at gcc dot gnu.org
  2014-02-01  8:44 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-01-31 13:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Richard Biener from comment #1)
> does it work if you configure with --without-build-config?  (thus, disable
> bootstrap-debug)

Just for the recores, this configure option produces a usable gcc.

I will try if I can execute the test suite now.


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (12 preceding siblings ...)
  2014-01-31 13:12 ` bernd.edlinger at hotmail dot de
@ 2014-01-31 23:57 ` vmakarov at gcc dot gnu.org
  2014-02-01  8:44 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2014-01-31 23:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Fri Jan 31 23:56:46 2014
New Revision: 207375

URL: http://gcc.gnu.org/viewcvs?rev=207375&root=gcc&view=rev
Log:
2014-01-31  Vladimir Makarov  <vmakarov@redhat.com>

    PR bootstrap/59985
    * lra-constraints.c (process_alt_operands): Update reload_sum only
    on the first pass.

2014-01-31  Vladimir Makarov  <vmakarov@redhat.com>

    PR bootstrap/59985
    * gcc.target/arm/pr59985.C: New.


Added:
    trunk/gcc/testsuite/gcc.target/arm/pr59985.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lra-constraints.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug bootstrap/59985] stage2/3 compare error on lto-streamer-in.o
  2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
                   ` (13 preceding siblings ...)
  2014-01-31 23:57 ` vmakarov at gcc dot gnu.org
@ 2014-02-01  8:44 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-01  8:44 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Supposedly fixed.


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

end of thread, other threads:[~2014-02-01  8:44 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-29 14:57 [Bug bootstrap/59985] New: stage2/3 compare error on lto-streamer-in.o bernd.edlinger at hotmail dot de
2014-01-29 15:31 ` [Bug bootstrap/59985] " rguenth at gcc dot gnu.org
2014-01-30  7:40 ` bernd.edlinger at hotmail dot de
2014-01-30  7:58 ` jakub at gcc dot gnu.org
2014-01-30  8:19 ` bernd.edlinger at hotmail dot de
2014-01-30  8:22 ` jakub at gcc dot gnu.org
2014-01-30  8:54 ` bernd.edlinger at hotmail dot de
2014-01-30 12:20 ` jakub at gcc dot gnu.org
2014-01-30 13:40 ` jakub at gcc dot gnu.org
2014-01-30 15:55 ` jakub at gcc dot gnu.org
2014-01-30 17:02 ` jakub at gcc dot gnu.org
2014-01-30 17:19 ` jakub at gcc dot gnu.org
2014-01-30 17:50 ` vmakarov at gcc dot gnu.org
2014-01-31 13:12 ` bernd.edlinger at hotmail dot de
2014-01-31 23:57 ` vmakarov at gcc dot gnu.org
2014-02-01  8:44 ` jakub at gcc dot gnu.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).