public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
@ 2013-12-27 14:15 ` hubicka at gcc dot gnu.org
  2013-12-30 13:48 ` hubicka at gcc dot gnu.org
                   ` (32 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-27 14:15 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-12-27
                 CC|                            |hubicka at gcc dot gnu.org
            Summary|ICE in                      |[4.9 regression] ICE in
                   |maybe_record_trace_start,   |maybe_record_trace_start,
                   |at dwarf2cfi.c:2239         |at dwarf2cfi.c:2239
     Ever confirmed|0                           |1

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Same ICE also breaks bootstrap with -mno-accumulate-outoging-args on 32bit

 /home/jh/trunk/build4/./gcc/gccgo -B/home/jh/trunk/build4/./gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include -minline-all-stringops -O2
-mno-accumulate-outgoing-args -g -m32 -I . -c -fgo-pkgpath=encoding/binary
../../../../libgo/go/encoding/binary/binary.go
../../../../libgo/go/encoding/binary/varint.go  -fPIC -o
encoding/.libs/binary.o
./libtool: line 1143: warning: setlocale: LC_CTYPE: cannot change locale
(cs_CZ.ISO-8859-2)
../../../../libgo/go/encoding/binary/binary.go: In function 'binary.Write':
../../../../libgo/go/encoding/binary/binary.go:334:1: internal compiler error:
in maybe_record_trace_start, at dwarf2cfi.c:2239
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
  2013-12-27 14:15 ` [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239 hubicka at gcc dot gnu.org
@ 2013-12-30 13:48 ` hubicka at gcc dot gnu.org
  2013-12-30 14:03 ` hubicka at gcc dot gnu.org
                   ` (31 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-30 13:48 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

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

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
On x86-64 the problem is iteration of crossjumping and dwarf2cfi.  We
introduce:


(insn:TI 559 558 2420 38 (set (mem:SI (pre_dec:SI (reg/f:SI 7 sp)) [0  S4 A8])
        (reg/f:SI 6 bp [orig:159 bs ] [159]))
../../../../libgo/go/encoding/binary/binary.go:263 66 {*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 28 [0x1c])
        (nil)))
(code_label 2420 559 2418 39 722 "" [1 uses])
(note 2418 2420 772 39 [bb 39] NOTE_INSN_BASIC_BLOCK)
(insn:TI 772 2418 773 39 (set (mem/f:SI (pre_dec:SI (reg/f:SI 7 sp)) [6  S4
A32])
        (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 64 [0x40])) [57 %sfp+-220 S4 A32]))
../../../../libgo/go/encoding/binary/binary.go:273 66 {*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 32 [0x20])
        (nil)))
(call_insn:TI 773 772 774 39 (call (mem:QI (reg/f:SI 0 ax [orig:233 D.6194 ]
[233]) [0  S1 A8])
        (const_int 32 [0x20]))
../../../../libgo/go/encoding/binary/binary.go:273 672 {*call}
     (expr_list:REG_DEAD (reg/f:SI 0 ax [orig:233 D.6194 ] [233])
        (nil))
    (nil))
(insn:TI 774 773 100 39 (parallel [
            (set (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int 32 [0x20])))
            (clobber (reg:CC 17 flags))
            (clobber (reg:CC 17 flags))
        ]) ../../../../libgo/go/encoding/binary/binary.go:273 265 {*addsi_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_ARGS_SIZE (const_int 0 [0])
            (nil))))
(insn 100 774 101 39 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 24 [0x18])) [57 %sfp+-232 S4 A32])
        (const_int 8 [0x8])) ../../../../libgo/go/encoding/binary/binary.go:272
90 {*movsi_internal}
     (nil))
(insn 101 100 2682 39 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 12 [0xc])) [57 %sfp+-244 S4 A32])
        (const_int 2 [0x2])) ../../../../libgo/go/encoding/binary/binary.go:272
90 {*movsi_internal}
     (nil))
(jump_insn:TI 2682 101 2683 39 (set (pc)
        (label_ref 1634)) 667 {jump}
     (nil)
 -> 1634)

dwarf2cfi is apparently not able to merge these calls since they have different
stack pointers at that time:
(gdb) p *ti->beg_row
$7 = {cfa = {offset = 316, base_offset = 0, reg = 4, indirect = 0, in_use = 0},
cfa_cfi = 0x0, reg_save = 0x7ffff6f7ecd0}
(gdb) p *cur_row
$8 = {cfa = {offset = 304, base_offset = 0, reg = 4, indirect = 0, in_use = 0},
cfa_cfi = 0x0, reg_save = 0x7ffff6f9f730}
(gdb)

I am not quite sure why they are different, since the calls both leads to
normal return and seem to expect sp to be sane.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
  2013-12-27 14:15 ` [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239 hubicka at gcc dot gnu.org
  2013-12-30 13:48 ` hubicka at gcc dot gnu.org
@ 2013-12-30 14:03 ` hubicka at gcc dot gnu.org
  2013-12-30 20:31 ` hubicka at gcc dot gnu.org
                   ` (30 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-30 14:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
First block is:

(insn:TI 551 2434 552 38 (set (mem/f/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 104 [0x68])) [17 MEM[(struct  *)&bs]+0 S4 A64])
        (reg/f:SI 6 bp [orig:159 bs ] [159]))
../../../../libgo/go/encoding/binary/binary.go:263 90 {*movsi_internal}
     (nil))
(insn 552 551 553 38 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 108 [0x6c])) [17 MEM[(struct  *)&bs + 4B]+0 S4 A32])
        (const_int 2 [0x2])) ../../../../libgo/go/encoding/binary/binary.go:263
90 {*movsi_internal}
     (nil))
(insn:TI 553 552 556 38 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 112 [0x70])) [17 MEM[(struct  *)&bs + 8B]+0 S4 A64])
        (const_int 8 [0x8])) ../../../../libgo/go/encoding/binary/binary.go:263
90 {*movsi_internal}
     (nil))
(insn 556 553 557 38 (set (mem:HI (reg/f:SI 7 sp) [49  S2 A16])
        (reg/v:HI 1 dx [orig:202 v ] [202]))
../../../../libgo/go/encoding/binary/binary.go:263 91 {*movhi_internal}
     (expr_list:REG_DEAD (reg/v:HI 1 dx [orig:202 v ] [202])
        (expr_list:REG_ARGS_SIZE (const_int 16 [0x10])
            (nil))))
(insn:TI 557 556 558 38 (set (mem:SI (pre_dec:SI (reg/f:SI 7 sp)) [0  S4 A8])
        (const_int 8 [0x8])) ../../../../libgo/go/encoding/binary/binary.go:263
66 {*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 20 [0x14])
        (nil)))
(insn 558 557 559 38 (set (mem:SI (pre_dec:SI (reg/f:SI 7 sp)) [0  S4 A8])
        (const_int 2 [0x2])) ../../../../libgo/go/encoding/binary/binary.go:263
66 {*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 24 [0x18])
        (nil)))
(insn:TI 559 558 2420 38 (set (mem:SI (pre_dec:SI (reg/f:SI 7 sp)) [0  S4 A8])
        (reg/f:SI 6 bp [orig:159 bs ] [159]))
../../../../libgo/go/encoding/binary/binary.go:263 66 {*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 28 [0x1c])
        (nil)))

Second is:
(code_label 2425 707 2423 54 723 "" [1 uses])
(note 2423 2425 760 54 [bb 54] NOTE_INSN_BASIC_BLOCK)
(insn:TI 760 2423 761 54 (set (mem/f/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 104 [0x68])) [17 MEM[(struct  *)&bs]+0 S4 A64])
        (reg/f:SI 6 bp [orig:159 bs ] [159]))
../../../../libgo/go/encoding/binary/binary.go:273 90 {*movsi_internal}
     (nil))
(insn 761 760 766 54 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 108 [0x6c])) [17 MEM[(struct  *)&bs + 4B]+0 S4 A32])
        (const_int 2 [0x2])) ../../../../libgo/go/encoding/binary/binary.go:273
90 {*movsi_internal}
     (nil))
(insn 766 761 762 54 (parallel [
            (set (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int -12 [0xfffffffffffffff4])))
            (clobber (reg:CC 17 flags))
        ]) ../../../../libgo/go/encoding/binary/binary.go:273 265 {*addsi_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_ARGS_SIZE (const_int 28 [0x1c])
            (nil))))
(insn:TI 762 766 765 54 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 124 [0x7c])) [17 MEM[(struct  *)&bs + 8B]+0 S4 A64])
        (const_int 8 [0x8])) ../../../../libgo/go/encoding/binary/binary.go:273
90 {*movsi_internal}
     (nil))
(insn 765 762 770 54 (set (mem:HI (plus:SI (reg/f:SI 7 sp)
                (const_int 12 [0xc])) [49  S2 A16])
        (reg/v:HI 1 dx [orig:232 v ] [232]))
../../../../libgo/go/encoding/binary/binary.go:273 91 {*movhi_internal}
     (expr_list:REG_DEAD (reg/v:HI 1 dx [orig:232 v ] [232])
        (expr_list:REG_ARGS_SIZE (const_int 16 [0x10])
            (nil))))
(insn 770 765 2326 54 (set (reg:SI 2 cx [488])
        (const_int 3 [0x3])) ../../../../libgo/go/encoding/binary/binary.go:273
90 {*movsi_internal}
     (expr_list:REG_EQUAL (const_int 3 [0x3])
        (nil)))
(insn:TI 2326 770 2023 54 (set (reg:SI 4 si [487])
        (plus:SI (reg/f:SI 7 sp)
            (const_int 116 [0x74])))
../../../../libgo/go/encoding/binary/binary.go:273 258 {*leasi}
     (nil))
(insn 2023 2326 771 54 (set (reg/f:SI 5 di [486])
        (reg/f:SI 7 sp)) ../../../../libgo/go/encoding/binary/binary.go:273 90
{*movsi_internal}
     (nil))
(insn:TI 771 2023 2693 54 (parallel [
            (set (reg:SI 2 cx [488])
                (const_int 0 [0]))
            (set (reg/f:SI 5 di [486])
                (plus:SI (ashift:SI (reg:SI 2 cx [488])
                        (const_int 2 [0x2]))
                    (reg/f:SI 5 di [486])))
            (set (reg:SI 4 si [487])
                (plus:SI (ashift:SI (reg:SI 2 cx [488])
                        (const_int 2 [0x2]))
                    (reg:SI 4 si [487])))
            (set (mem:BLK (reg/f:SI 5 di [486]) [0  S12 A32])
                (mem/c:BLK (reg:SI 4 si [487]) [17 bs+0 S12 A64]))
            (use (reg:SI 2 cx [488]))
        ]) ../../../../libgo/go/encoding/binary/binary.go:273 921 {*rep_movsi}
     (expr_list:REG_UNUSED (reg/f:SI 5 di [486])
        (expr_list:REG_UNUSED (reg:SI 4 si [487])
            (expr_list:REG_UNUSED (reg:SI 2 cx [488])
                (nil)))))
(jump_insn:TI 2693 771 2694 54 (set (pc)
        (label_ref 2420)) 667 {jump}
     (nil)

In both code paths ARG_SIZE is 28 that seems all right.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-12-30 14:03 ` hubicka at gcc dot gnu.org
@ 2013-12-30 20:31 ` hubicka at gcc dot gnu.org
  2013-12-30 21:15 ` hubicka at gcc dot gnu.org
                   ` (29 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-30 20:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK, sched2 reorders:
(insn 762 761 765 50 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 112 [0x70])) [17 MEM[(struct  *)&bs + 8B]+0 S4 A64])
        (const_int 8 [0x8])) ../../../../libgo/go/encoding/binary/binary.go:273
90 {*movsi_internal}
     (nil))

(insn 765 762 766 50 (set (mem:HI (reg/f:SI 7 sp) [49  S2 A16])
        (reg/v:HI 1 dx [orig:232 v ] [232]))
../../../../libgo/go/encoding/binary/binary.go:273 91 {*movhi_internal}
     (expr_list:REG_DEAD (reg/v:HI 1 dx [orig:232 v ] [232])
        (expr_list:REG_ARGS_SIZE (const_int 16 [0x10])
            (nil))))
(insn 766 765 2326 50 (parallel [
            (set (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int -12 [0xfffffffffffffff4])))
            (clobber (reg:CC 17 flags))
        ]) ../../../../libgo/go/encoding/binary/binary.go:273 265 {*addsi_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_ARGS_SIZE (const_int 28 [0x1c])
            (nil))))

to
(insn 766 761 762 54 (parallel [
            (set (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int -12 [0xfffffffffffffff4])))
            (clobber (reg:CC 17 flags))
        ]) ../../../../libgo/go/encoding/binary/binary.go:273 265 {*addsi_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags) 
        (expr_list:REG_ARGS_SIZE (const_int 28 [0x1c])
            (nil))))
(insn:TI 762 766 765 54 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 124 [0x7c])) [17 MEM[(struct  *)&bs + 8B]+0 S4 A64])
        (const_int 8 [0x8])) ../../../../libgo/go/encoding/binary/binary.go:273
90 {*movsi_internal}
     (nil))     
(insn 765 762 770 54 (set (mem:HI (plus:SI (reg/f:SI 7 sp)
                (const_int 12 [0xc])) [49  S2 A16])
        (reg/v:HI 1 dx [orig:232 v ] [232]))
../../../../libgo/go/encoding/binary/binary.go:273 91 {*movhi_internal}
     (expr_list:REG_DEAD (reg/v:HI 1 dx [orig:232 v ] [232])
        (expr_list:REG_ARGS_SIZE (const_int 16 [0x10])
            (nil))))

Here insn 765 gets adjusted for insn766 wihtout updating REG_ARGS_SIZE.  I
guess it is because REG_ARGS_SIZE is supposed to sit on insn adjust the stack.

Insn 765 looks as follows:
(insn 762 761 763 50 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 112 [0x70])) [17 MEM[(struct  *)&bs + 8B]+0 S4 A64])
        (const_int 8 [0x8])) ../../../../libgo/go/encoding/binary/binary.go:273
90 {*movsi_internal}
     (nil))
(insn 763 762 764 50 (parallel [
            (set (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int 16 [0x10])))
            (clobber (reg:CC 17 flags))
        ]) ../../../../libgo/go/encoding/binary/binary.go:273 265 {*addsi_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_ARGS_SIZE (const_int 0 [0])
            (nil))))
(insn 764 763 765 50 (parallel [
            (set (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int -12 [0xfffffffffffffff4])))
            (clobber (reg:CC 17 flags))
        ]) ../../../../libgo/go/encoding/binary/binary.go:273 265 {*addsi_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_ARGS_SIZE (const_int 12 [0xc])
            (nil))))

(insn 765 764 766 50 (set (mem:HI (pre_modify:SI (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int -4 [0xfffffffffffffffc]))) [49  S2 A16])
        (reg/v:HI 1 dx [orig:232 v ] [232]))
../../../../libgo/go/encoding/binary/binary.go:273 71 {*pushhi2}
     (expr_list:REG_DEAD (reg/v:HI 1 dx [orig:232 v ] [232])
        (expr_list:REG_ARGS_SIZE (const_int 16 [0x10])
            (nil))))
until CSA pass where it gets transformed as:
(insn 762 761 765 50 (set (mem/c:SI (plus:SI (reg/f:SI 7 sp)
                (const_int 112 [0x70])) [17 MEM[(struct  *)&bs + 8B]+0 S4 A64])
        (const_int 8 [0x8])) ../../../../libgo/go/encoding/binary/binary.go:273
90 {*movsi_internal}
     (nil))
(insn 765 762 766 50 (set (mem:HI (reg/f:SI 7 sp) [49  S2 A16])
        (reg/v:HI 1 dx [orig:232 v ] [232]))
../../../../libgo/go/encoding/binary/binary.go:273 91 {*movhi_internal}
     (expr_list:REG_DEAD (reg/v:HI 1 dx [orig:232 v ] [232])
        (expr_list:REG_ARGS_SIZE (const_int 16 [0x10])
            (nil))))

My conclussion thus would be that CSA ought to remove the REG_ARGS_SIZE note
since it combines stack adjustment with call insn much earlier in the insn
stream:
(insn 749 746 750 50 (set (mem/f:SI (pre_dec:SI (reg/f:SI 7 sp)) [6  S4 A32])
        (mem/u/c:SI (plus:SI (reg:SI 3 bx)
                (const:SI (unspec:SI [
                            (symbol_ref/i:SI ("__go_tdn_uint16")  <var_decl
0x7ffff6f23850 __go_tdn_uint16>)
                        ] UNSPEC_GOT))) [58  S4 A8]))
../../../../libgo/go/encoding/binary/binary.go:271 66 {*pushsi2}
     (expr_list:REG_ARGS_SIZE (const_int 16 [0x10])
        (nil)))
(call_insn 750 749 2021 50 (call (mem:QI (symbol_ref:SI
("__go_check_interface_type") [flags 0x41]  <function_decl 0x7ffff6fcf400
__go_check_interface_type>) [0 __go_check_interface_type S1 A8])
        (const_int 16 [0x10]))
../../../../libgo/go/encoding/binary/binary.go:271 672 {*call}
     (expr_list:REG_DEAD (reg:SI 3 bx)
        (nil))
    (expr_list:REG_DEP_TRUE (use (reg:SI 3 bx))
        (nil)))


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2013-12-30 20:31 ` hubicka at gcc dot gnu.org
@ 2013-12-30 21:15 ` hubicka at gcc dot gnu.org
  2014-01-07 11:53 ` rguenth at gcc dot gnu.org
                   ` (28 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-30 21:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I am testing:
Index: combine-stack-adj.c
===================================================================
--- combine-stack-adj.c (revision 206233)
+++ combine-stack-adj.c (working copy)
@@ -567,6 +568,7 @@ combine_stack_adjustments_for_block (bas
              && try_apply_stack_adjustment (insn, reflist, 0,
                                             -last_sp_adjust))
            {
+             rtx note;
              if (last2_sp_set)
                maybe_move_args_size_note (last2_sp_set, last_sp_set, false);
              else
@@ -576,6 +578,11 @@ combine_stack_adjustments_for_block (bas
              reflist = NULL;
              last_sp_set = NULL_RTX;
              last_sp_adjust = 0;
+             /* We no longer adjust stack size.  Whoever adjusted it earlier
+                hopefully got the note right.  */
+             note = find_reg_note (insn, REG_ARGS_SIZE, NULL_RTX);
+             if (note)
+               remove_note (insn, note);
              continue;
            }
        }


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2013-12-30 21:15 ` hubicka at gcc dot gnu.org
@ 2014-01-07 11:53 ` rguenth at gcc dot gnu.org
  2014-01-22 20:03 ` jakub at gcc dot gnu.org
                   ` (27 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-01-07 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2014-01-07 11:53 ` rguenth at gcc dot gnu.org
@ 2014-01-22 20:03 ` jakub at gcc dot gnu.org
  2014-01-23 15:40 ` jakub at gcc dot gnu.org
                   ` (26 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-22 20:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The #c1 to #c5 comments are completely unrelated to the #c0 issue, which is
clearly a bug in the ARM backend.

When creating prologue, the ARM backend decides to save some garbage registers
(just to avoid having to decrement stack pointer separately?):
      if (optimize_size && !frame_pointer_needed
          && saved_regs == offsets->saved_regs - offsets->saved_args)
        {
          /* If no coprocessor registers are being pushed and we don't have
             to worry about a frame pointer then push extra registers to
             create the stack frame.  This is done is a way that does not
             alter the frame layout, so is independent of the epilogue.  */
          int n;
          int frame;
          n = 0;
          while (n < 8 && (live_regs_mask & (1 << n)) == 0)
            n++;
          frame = offsets->outgoing_args - (offsets->saved_args + saved_regs);
          if (frame && n * 4 >= frame)
            {
              n = frame / 4;
              live_regs_mask |= (1 << n) - 1;
              saved_regs += frame;
            }
        }
so without -g we get:
        stmfd   sp!, {r0, r1, r2, lr}
in the prologue (note, this is shrink wrapped) and
        add     sp, sp, #12
        @ sp needed
        ldr     lr, [sp], #4
in the epilogue (note, r0-r2 not restored there).
This is all fine, except that the
emit_multi_reg_push/arm_emit_strd_push/thumb2_emit_strd_push all record all
those saved registers into
REG_FRAME_RELATED_EXPR, which is a very bad idea.  Only call clobbered
registers that you actually save in prologue and restore in epilogue should be
declared as saved for CFI purposes, the dwarf2cfi.c code verifies this property
and that's the reason for this ICE.

Now, I'm afraid I'm not familiar enough with the multitude of ARM ABIs, so not
sure if the best fix is just to ignore for the REG_FRAME_RELATED_EXPR in those
3 above mentioned functions all non-fixed call_used registers, just ignore
r0..r3, or if the caller should call those functions with two masks, one for
what registers should be actually saved to the stack (as right now) and another
for which registers should be in REG_FRAME_RELATED_EXPR (equal to the first or
some subset thereof).


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2014-01-22 20:03 ` jakub at gcc dot gnu.org
@ 2014-01-23 15:40 ` jakub at gcc dot gnu.org
  2014-01-23 15:41 ` jakub at gcc dot gnu.org
                   ` (25 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-23 15:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Actually, it seems like the code can push up to 8 of the dummy regs and 4 of
them are call saved (but they can be just unused in the function and thus still
saved as dummy regs and not restored in the epilogue anywhere and thus
shouldn't be visible to the debugger).
Thus the only fix seems to me is to add the extra bitmask argument to the 3
calls.

I've done that in the patch I'll attach, though it is completely untested and I
don't have easy access to some box where I could test it.

Also note that I think 2 of the 3 actually may generate more than one
instruction for the push, but still pretend the first instruction adjusts the
stack pointer by what all the instructions do together and pretends to save all
registers, that looks wrong to me, but I haven't tried to do anything about it.
I'd say each of the insns should get it's own REG_FRAME_RELATED_EXPR describing
what that particular instruction actually does that CFI cares about (i.e. stack
adjustment (by 4 or 8 bytes?)) and which (if any) dwarf_cfa_mask mentioned regs
are saved in that particular instruction.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2014-01-23 15:40 ` jakub at gcc dot gnu.org
@ 2014-01-23 15:41 ` jakub at gcc dot gnu.org
  2014-01-23 17:37 ` rmansfield at qnx dot com
                   ` (24 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-23 15:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 31934
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31934&action=edit
gcc49-pr59575.patch

Untested fix.  Can somebody please test it?


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2014-01-23 15:41 ` jakub at gcc dot gnu.org
@ 2014-01-23 17:37 ` rmansfield at qnx dot com
  2014-01-23 17:47 ` jakub at gcc dot gnu.org
                   ` (23 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rmansfield at qnx dot com @ 2014-01-23 17:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Ryan Mansfield <rmansfield at qnx dot com> ---
(In reply to Jakub Jelinek from comment #8)
> Created attachment 31934 [details]
> gcc49-pr59575.patch
> 
> Untested fix.  Can somebody please test it?

The attached patch fixes the original ICE but introduces a new one.


 -I../../../libgcc/../include  -DHAVE_CC_TLS  -o unwind-c.o -MT unwind-c.o -MD
-MP -MF unwind-c.dep -fexceptions -c ../../../libgcc/unwind-c.c
-fvisibility=hidden -DHIDE_EXPORTS
../../../libgcc/unwind-arm-common.inc:275:1: internal compiler error: in
arm_unwind_emit_sequence, at config/arm/arm.c:28777
 }
 ^
0xbef8a5 arm_unwind_emit_sequence
    ../../gcc/config/arm/arm.c:28777
0xbef8a5 arm_unwind_emit
    ../../gcc/config/arm/arm.c:28999
0x708bde final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
    ../../gcc/final.c:2978
0x709585 final(rtx_def*, _IO_FILE*, int)
    ../../gcc/final.c:2024
0x7099a9 rest_of_handle_final
    ../../gcc/final.c:4438
0x7099a9 execute
    ../../gcc/final.c:4513
Please submit a full bug report,
with preprocessed source if appropriate.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2014-01-23 17:37 ` rmansfield at qnx dot com
@ 2014-01-23 17:47 ` jakub at gcc dot gnu.org
  2014-01-23 17:53 ` rmansfield at qnx dot com
                   ` (22 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-23 17:47 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 4268 bytes --]

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Ryan Mansfield from comment #9)
> (In reply to Jakub Jelinek from comment #8)
> > Created attachment 31934 [details]
> > gcc49-pr59575.patch
> > 
> > Untested fix.  Can somebody please test it?
> 
> The attached patch fixes the original ICE but introduces a new one.
> 
> 
>  -I../../../libgcc/../include  -DHAVE_CC_TLS  -o unwind-c.o -MT unwind-c.o
> -MD -MP -MF unwind-c.dep -fexceptions -c ../../../libgcc/unwind-c.c
> -fvisibility=hidden -DHIDE_EXPORTS
> ../../../libgcc/unwind-arm-common.inc:275:1: internal compiler error: in
> arm_unwind_emit_sequence, at config/arm/arm.c:28777
>  }
>  ^
> 0xbef8a5 arm_unwind_emit_sequence
> 	../../gcc/config/arm/arm.c:28777
> 0xbef8a5 arm_unwind_emit
> 	../../gcc/config/arm/arm.c:28999
> 0x708bde final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
> 	../../gcc/final.c:2978
> 0x709585 final(rtx_def*, _IO_FILE*, int)
> 	../../gcc/final.c:2024
> 0x7099a9 rest_of_handle_final
> 	../../gcc/final.c:4438
> 0x7099a9 execute
> 	../../gcc/final.c:4513
> Please submit a full bug report,
> with preprocessed source if appropriate.

Can you please attach unwind-c.i ?  What exact options is it compiled with
(including whatever -march/float abi/etc. is needed to reproduce on
say --target armv5tel-unknown-linux-gnueabi configured gcc)?
I'm surprised it would affect arm unwind info, but perhaps I've made a bug in
the patch somewhere.
>From gcc-bugs-return-441343-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jan 23 17:51:50 2014
Return-Path: <gcc-bugs-return-441343-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27013 invoked by alias); 23 Jan 2014 17:51:50 -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 25332 invoked by uid 48); 23 Jan 2014 17:51:18 -0000
From: "rmansfield at qnx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
Date: Thu, 23 Jan 2014 17:51:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: debug
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rmansfield at qnx dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-59575-4-7FU9LwfmW4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59575-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59575-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/msg02485.txt.bz2
Content-length: 909

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

--- Comment #11 from Ryan Mansfield <rmansfield at qnx dot com> ---
Created attachment 31937
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id1937&actioníit
preprocessed src

Configured with: ../configure --target=arm-unknown-linux-gnueabi
--prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi
--with-sysroot=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root
--disable-multilib
--with-local-prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99
--enable-long-long --enable-target-optspace
target_alias=arm-unknown-linux-gnueabi --enable-languages=c++ --disable-shared
--disable-libmudflap --disable-libssp --enable-checking
Thread model: posix
gcc version 4.9.0 20140123 (experimental) [trunk revision 206976] (GCC)


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2014-01-23 17:47 ` jakub at gcc dot gnu.org
@ 2014-01-23 17:53 ` rmansfield at qnx dot com
  2014-01-23 20:24 ` jakub at gcc dot gnu.org
                   ` (21 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rmansfield at qnx dot com @ 2014-01-23 17:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Ryan Mansfield <rmansfield at qnx dot com> ---
/home/ryan/gnu/gcc/trunk/arm-eabi/./gcc/xgcc
-B/home/ryan/gnu/gcc/trunk/arm-eabi/./gcc/
-B/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/
-B/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/lib/
-isystem
/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/include
-isystem
/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-include
   -g -Os -O2  -g -Os -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC
-fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC
-fno-inline -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/.
-I../../../libgcc/../gcc -I../../../libgcc/../include  -DHAVE_CC_TLS  -o
pr-support.o -MT pr-support.o -MD -MP -MF pr-support.dep -fexceptions -c
../../../libgcc/config/arm/pr-support.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from ./unwind.h:30:0,
                 from ../../../libgcc/config/arm/pr-support.c:24:
/home/ryan/gnu/gcc/trunk/arm-eabi/gcc/include/unwind-arm-common.h: In function
'_Unwind_GetGR.constprop':
/home/ryan/gnu/gcc/trunk/arm-eabi/gcc/include/unwind-arm-common.h:225:5:
internal compiler error: in arm_unwind_emit_sequence, at config/arm/arm.c:28777
     }
     ^
0xbef8a5 arm_unwind_emit_sequence
    ../../gcc/config/arm/arm.c:28777
0xbef8a5 arm_unwind_emit
    ../../gcc/config/arm/arm.c:28999
0x708bde final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
    ../../gcc/final.c:2978
0x709585 final(rtx_def*, _IO_FILE*, int)
    ../../gcc/final.c:2024
0x7099a9 rest_of_handle_final
    ../../gcc/final.c:4438
0x7099a9 execute
    ../../gcc/final.c:4513
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
../../../libgcc/static-object.mk:17: recipe for target 'pr-support.o' failed
make: *** [pr-support.o] Error 1


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2014-01-23 17:53 ` rmansfield at qnx dot com
@ 2014-01-23 20:24 ` jakub at gcc dot gnu.org
  2014-01-23 20:27 ` jakub at gcc dot gnu.org
                   ` (20 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-23 20:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Ryan Mansfield from comment #12)
> /home/ryan/gnu/gcc/trunk/arm-eabi/./gcc/xgcc
> -B/home/ryan/gnu/gcc/trunk/arm-eabi/./gcc/
> -B/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/
> -B/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/lib/
> -isystem
> /home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/
> include -isystem
> /home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-
> include    -g -Os -O2  -g -Os -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W
> -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
> -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC
> -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC
> -fno-inline -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/.
> -I../../../libgcc/../gcc -I../../../libgcc/../include  -DHAVE_CC_TLS  -o
> pr-support.o -MT pr-support.o -MD -MP -MF pr-support.dep -fexceptions -c
> ../../../libgcc/config/arm/pr-support.c -fvisibility=hidden -DHIDE_EXPORTS
> In file included from ./unwind.h:30:0,
>                  from ../../../libgcc/config/arm/pr-support.c:24:
> /home/ryan/gnu/gcc/trunk/arm-eabi/gcc/include/unwind-arm-common.h: In
> function '_Unwind_GetGR.constprop':
> /home/ryan/gnu/gcc/trunk/arm-eabi/gcc/include/unwind-arm-common.h:225:5:
> internal compiler error: in arm_unwind_emit_sequence, at
> config/arm/arm.c:28777
>      }
>      ^
> 0xbef8a5 arm_unwind_emit_sequence
> 	../../gcc/config/arm/arm.c:28777
> 0xbef8a5 arm_unwind_emit
> 	../../gcc/config/arm/arm.c:28999
> 0x708bde final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
> 	../../gcc/final.c:2978
> 0x709585 final(rtx_def*, _IO_FILE*, int)
> 	../../gcc/final.c:2024
> 0x7099a9 rest_of_handle_final
> 	../../gcc/final.c:4438
> 0x7099a9 execute
> 	../../gcc/final.c:4513
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> ../../../libgcc/static-object.mk:17: recipe for target 'pr-support.o' failed
> make: *** [pr-support.o] Error 1

Ah, ok, I see, arm_unwind_emit_sequence is being passed the
REG_FRAME_RELATED_EXPR sequence.  So, I guess the primary question is, do you
want to emit:
        stmfd   sp!, {r0, r1, r2, r4, r5, lr}
        .save {r0, r1, r2, r4, r5, lr}
or:
        stmfd   sp!, {r0, r1, r2, r4, r5, lr}
        .save {r4, r5, lr}
        .pad #12
when r0/r1/r2 have been added just to align the thing?
For the latter case (which I think is conceptually better, the r0/r1/r2 really
don't need to be saved) I think it would be enough just to look at the sp
offsets where each register is saved and figure out the gaps.  Before my patch
the only gap could be PC register as the topmost one.  With my patch there can
be also a gap at the very bottom.

Anyway, it would be nice to hear ARM maintainers about this.
>From gcc-bugs-return-441369-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jan 23 20:25:34 2014
Return-Path: <gcc-bugs-return-441369-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29257 invoked by alias); 23 Jan 2014 20:25:33 -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 29213 invoked by uid 48); 23 Jan 2014 20:25:31 -0000
From: "law at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/59915] [4.9 Regression] LRA ICE - Repeated looping over subreg reloads (gcc.c-torture/compile/simd-3.c)
Date: Thu, 23 Jan 2014 20:25:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: law at redhat dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc resolution
Message-ID: <bug-59915-4-3QSBeGVvg1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59915-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59915-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/msg02511.txt.bz2
Content-length: 505

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

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |law at redhat dot com
         Resolution|---                         |FIXED

--- Comment #3 from Jeffrey A. Law <law at redhat dot com> ---
Fixed by Vlad's commit.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2014-01-23 20:24 ` jakub at gcc dot gnu.org
@ 2014-01-23 20:27 ` jakub at gcc dot gnu.org
  2014-01-24  8:26 ` jakub at gcc dot gnu.org
                   ` (19 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-23 20:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Oh, one more thing, supposedly I could have left the thumb2_emit_strd_push and
arm_emit_strd_push functions unmodified, because the addition of extra low
registers to live_reg_mask is guarded with optimize_size, and
the above mentioned two functions are only called if
!optimize_function_for_size_p (cfun)
(and that function returns always true for optimize_size).


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2014-01-23 20:27 ` jakub at gcc dot gnu.org
@ 2014-01-24  8:26 ` jakub at gcc dot gnu.org
  2014-01-26 16:35 ` rmansfield at qnx dot com
                   ` (18 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-24  8:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31934|0                           |1
        is obsolete|                            |

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 31943
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31943&action=edit
gcc49-pr59575.patch

Updated patch, which should now handle the dummy pushes also in
arm_unwind_emit_sequence.  Untested as before, just it doesn't ICE on the
source you've attached anymore.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2014-01-24  8:26 ` jakub at gcc dot gnu.org
@ 2014-01-26 16:35 ` rmansfield at qnx dot com
  2014-01-26 20:19 ` jakub at gcc dot gnu.org
                   ` (17 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rmansfield at qnx dot com @ 2014-01-26 16:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Ryan Mansfield <rmansfield at qnx dot com> ---
(In reply to Jakub Jelinek from comment #15)
> Created attachment 31943 [details]
> gcc49-pr59575.patch
> 
> Updated patch, which should now handle the dummy pushes also in
> arm_unwind_emit_sequence.  Untested as before, just it doesn't ICE on the
> source you've attached anymore.

Thanks for the patch, but this one ICEs configuring libgcc. e.g.

configure:4222: checking whether to use setjmp/longjmp exceptions
configure:: /home/ryan/gnu/gcc/trunk/arm-eabi/./gcc/xgcc
-B/home/ryan/gnu/gcc/trunk/arm-eabi/./gcc/
-B/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/
-B/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/lib/
-isystem
/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/include
-isystem
/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-include
   -c --save-temps -fexceptions  conftest.c >&5

conftest.c: In function 'foo':
conftest.c:19:1: internal compiler error: Segmentation fault
 }
 ^
0x95cbcf crash_signal
        ../../gcc/toplev.c:337
0xbef5a6 arm_unwind_emit_sequence
        ../../gcc/config/arm/arm.c:28729
0xbef5a6 arm_unwind_emit
        ../../gcc/config/arm/arm.c:28970
0x708ede final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
        ../../gcc/final.c:2978
0x709885 final(rtx_def*, _IO_FILE*, int)
        ../../gcc/final.c:2024
0x709ca9 rest_of_handle_final
        ../../gcc/final.c:4438
0x709ca9 execute
        ../../gcc/final.c:4513
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2014-01-26 16:35 ` rmansfield at qnx dot com
@ 2014-01-26 20:19 ` jakub at gcc dot gnu.org
  2014-01-26 20:22 ` rmansfield at qnx dot com
                   ` (16 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-26 20:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Can I ask for preprocessed source + options again?


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2014-01-26 20:19 ` jakub at gcc dot gnu.org
@ 2014-01-26 20:22 ` rmansfield at qnx dot com
  2014-01-27  8:08 ` jakub at gcc dot gnu.org
                   ` (15 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rmansfield at qnx dot com @ 2014-01-26 20:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Ryan Mansfield <rmansfield at qnx dot com> ---
(In reply to Jakub Jelinek from comment #17)
> Can I ask for preprocessed source + options again?

$ cat ~/conftest.c
void bar ();
void clean (int *);
void foo ()
{
  int i __attribute__ ((cleanup (clean)));
  bar();  
}

ryan@zoidberg:~/gnu/gcc/trunk/arm-eabi/gcc$ ./xgcc -B. -fexceptions
~/conftest.c 
/home/ryan/conftest.c: In function 'foo':
/home/ryan/conftest.c:7:1: internal compiler error: Segmentation fault
 }
 ^
0x95cbcf crash_signal
    ../../gcc/toplev.c:337
0xbef5a6 arm_unwind_emit_sequence
    ../../gcc/config/arm/arm.c:28729
0xbef5a6 arm_unwind_emit
    ../../gcc/config/arm/arm.c:28970
0x708ede final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
    ../../gcc/final.c:2978
0x709885 final(rtx_def*, _IO_FILE*, int)
    ../../gcc/final.c:2024
0x709ca9 rest_of_handle_final
    ../../gcc/final.c:4438
0x709ca9 execute
    ../../gcc/final.c:4513
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (17 preceding siblings ...)
  2014-01-26 20:22 ` rmansfield at qnx dot com
@ 2014-01-27  8:08 ` jakub at gcc dot gnu.org
  2014-01-28 21:20 ` rmansfield at qnx dot com
                   ` (14 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-27  8:08 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 4766 bytes --]

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

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Ryan Mansfield from comment #18)
> (In reply to Jakub Jelinek from comment #17)
> > Can I ask for preprocessed source + options again?
> 
> $ cat ~/conftest.c
> void bar ();
> void clean (int *);
> void foo ()
> {
>   int i __attribute__ ((cleanup (clean)));
>   bar();  
> }
> 
> ryan@zoidberg:~/gnu/gcc/trunk/arm-eabi/gcc$ ./xgcc -B. -fexceptions
> ~/conftest.c 
> /home/ryan/conftest.c: In function 'foo':
> /home/ryan/conftest.c:7:1: internal compiler error: Segmentation fault
>  }
>  ^
> 0x95cbcf crash_signal
> 	../../gcc/toplev.c:337
> 0xbef5a6 arm_unwind_emit_sequence
> 	../../gcc/config/arm/arm.c:28729
> 0xbef5a6 arm_unwind_emit
> 	../../gcc/config/arm/arm.c:28970
> 0x708ede final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
> 	../../gcc/final.c:2978
> 0x709885 final(rtx_def*, _IO_FILE*, int)
> 	../../gcc/final.c:2024
> 0x709ca9 rest_of_handle_final
> 	../../gcc/final.c:4438
> 0x709ca9 execute
> 	../../gcc/final.c:4513
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <http://gcc.gnu.org/bugs.html> for instructions.

Sorry, can't reproduce.  Can you run it in the debugger
p debug_rtx (p)
up
p debug_rtx (insn)
?
>From gcc-bugs-return-441588-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jan 27 08:11:48 2014
Return-Path: <gcc-bugs-return-441588-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14002 invoked by alias); 27 Jan 2014 08:11:47 -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 13928 invoked by uid 48); 27 Jan 2014 08:11:42 -0000
From: "kcc at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/55309] gcc's address-sanitizer 66% slower than clang's
Date: Mon, 27 Jan 2014 08:11:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: kcc at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-55309-4-MQxDnbYklD@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-55309-4@http.gcc.gnu.org/bugzilla/>
References: <bug-55309-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/msg02730.txt.bz2
Content-length: 1562

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

--- Comment #58 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
FTR, here are the new numbers; except for 464.h264ref looks good.
clang r199888, gcc r207025
flags: -O2 -fsanitize­dress
machine: Dell 3500 (Intel(R) Xeon(R) CPU W3690  @ 3.47GHz)

                           clang          gcc            diff
       400.perlbench,      1286.00,        -1.00,        -0.00
           401.bzip2,       857.00,       940.00,         1.10
             403.gcc,       621.00,       606.00,         0.98
             429.mcf,       578.00,       574.00,         0.99
           445.gobmk,       860.00,       850.00,         0.99
           456.hmmer,       880.00,      1149.00,         1.31
           458.sjeng,       992.00,       996.00,         1.00
      462.libquantum,       492.00,       483.00,         0.98
         464.h264ref,      1274.00,      3998.00,         3.14
         471.omnetpp,       566.00,       569.00,         1.01
           473.astar,       661.00,       647.00,         0.98
       483.xalancbmk,       478.00,       491.00,         1.03
            433.milc,       620.00,       611.00,         0.99
            444.namd,       601.00,       528.00,         0.88
          447.dealII,       624.00,       670.00,         1.07
          450.soplex,       366.00,       389.00,         1.06
          453.povray,       430.00,       374.00,         0.87
             470.lbm,       355.00,       452.00,         1.27
         482.sphinx3,       926.00,      1108.00,         1.20


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (18 preceding siblings ...)
  2014-01-27  8:08 ` jakub at gcc dot gnu.org
@ 2014-01-28 21:20 ` rmansfield at qnx dot com
  2014-01-28 23:29 ` jakub at gcc dot gnu.org
                   ` (13 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rmansfield at qnx dot com @ 2014-01-28 21:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Ryan Mansfield <rmansfield at qnx dot com> ---
> Sorry, can't reproduce.  Can you run it in the debugger
> p debug_rtx (p)
> up
> p debug_rtx (insn)
> ?

Sorry for the delay.

Starting program: /home/ryan/gnu/gcc/trunk/arm-eabi/gcc/./cc1 -fexceptions
/home/ryan/conftest.c
 foo
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary>
<whole-program> <inline>Assembling functions:
 foo
Program received signal SIGSEGV, Segmentation fault.
0x0000000000c285e2 in arm_unwind_emit_sequence (asm_out_file=0x165d930, 
    p=0x7ffff6dd20a0) at ../../gcc/config/arm/arm.c:28728
28728          e = XEXP (SET_DEST (e), 0);
(gdb) p debug_rtx(p)
(sequence [
        (set/f (reg/f:SI 13 sp)
            (plus:SI (reg/f:SI 13 sp)
                (const_int -16 [0xfffffffffffffff0])))
        (set/f (mem/c:SI (reg/f:SI 13 sp) [0  S4 A32])
            (reg:SI 4 r4))
        (set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
                    (const_int 4 [0x4])) [0  S4 A32])
            (reg:SI 5 r5))
        (set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
                    (const_int 8 [0x8])) [0  S4 A32])
            (reg/f:SI 11 fp))
        (set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
                    (const_int 12 [0xc])) [0  S4 A32])
            (reg:SI 14 lr))
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
    ])
$2 = void
(gdb) up
#1  0x0000000000c2905e in arm_unwind_emit (asm_out_file=0x165d930, 
    insn=0x7ffff6dd31f8) at ../../gcc/config/arm/arm.c:28969
28969          arm_unwind_emit_sequence (asm_out_file, pat);
(gdb) p debug_rtx(insn)
(insn/f 65 3 66 (parallel [
            (set (mem/c:BLK (pre_modify:SI (reg/f:SI 13 sp)
                        (plus:SI (reg/f:SI 13 sp)
                            (const_int -16 [0xfffffffffffffff0]))) [0  A8])
                (unspec:BLK [
                        (reg:SI 4 r4)
                    ] UNSPEC_PUSH_MULT))
            (use (reg:SI 5 r5))
            (use (reg/f:SI 11 fp))
            (use (reg:SI 14 lr))
        ]) /home/ryan/conftest.c:4 341 {*push_multi}
     (expr_list:REG_FRAME_RELATED_EXPR (sequence [
                (set/f (reg/f:SI 13 sp)
                    (plus:SI (reg/f:SI 13 sp)
                        (const_int -16 [0xfffffffffffffff0])))
                (set/f (mem/c:SI (reg/f:SI 13 sp) [0  S4 A32])
                    (reg:SI 4 r4))
                (set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
                            (const_int 4 [0x4])) [0  S4 A32])
                    (reg:SI 5 r5))
                (set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
                            (const_int 8 [0x8])) [0  S4 A32])
                    (reg/f:SI 11 fp))
                (set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
                            (const_int 12 [0xc])) [0  S4 A32])
                    (reg:SI 14 lr))
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
                (nil)
            ])
        (nil)))
$3 = void


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (19 preceding siblings ...)
  2014-01-28 21:20 ` rmansfield at qnx dot com
@ 2014-01-28 23:29 ` jakub at gcc dot gnu.org
  2014-01-29 13:19 ` jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-28 23:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Can you
break gen_rtx_fmt_E_stat if code == SEQUENCE
and see where this SEQUENCE has been allocated and why the count is so bogusly
high?


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (20 preceding siblings ...)
  2014-01-28 23:29 ` jakub at gcc dot gnu.org
@ 2014-01-29 13:19 ` jakub at gcc dot gnu.org
  2014-01-29 14:13 ` rmansfield at qnx dot com
                   ` (11 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-29 13:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, I've even tried:
for k in arm thumb; do for j in soft softfp hard; do for i in armv2 armv2a
armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j
armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m
armv8-a armv8-a+crc iwmmxt iwmmxt2; do ./cc1 -fexceptions pr59575-3.c
-fpreprocessed -march=$i -mfloat-abi=$j -quiet -m$k; done; done; done
to see if #c18 ICE can be reproduced, but none of the combinations ICEd.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (21 preceding siblings ...)
  2014-01-29 13:19 ` jakub at gcc dot gnu.org
@ 2014-01-29 14:13 ` rmansfield at qnx dot com
  2014-01-29 14:28 ` rmansfield at qnx dot com
                   ` (10 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rmansfield at qnx dot com @ 2014-01-29 14:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #23 from Ryan Mansfield <rmansfield at qnx dot com> ---
(In reply to Jakub Jelinek from comment #21)
> Can you
> break gen_rtx_fmt_E_stat if code == SEQUENCE
> and see where this SEQUENCE has been allocated and why the count is so
> bogusly high?

#1  0x0000000000c110a2 in emit_multi_reg_push (mask=18480, 
    dwarf_regs_mask=18480) at ../../gcc/config/arm/arm.c:19645
19645      dwarf = gen_rtx_SEQUENCE (VOIDmode, rtvec_alloc (num_dwarf_regs +
1));


(gdb) p debug_rtx(dwarf)
(sequence [
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
        (nil)
    ])

(gdb) p num_dwarf_regs 
$7 = 44


I've made sure my sandbox is clean, and that I only have rev207207 + your
second patch applied.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (22 preceding siblings ...)
  2014-01-29 14:13 ` rmansfield at qnx dot com
@ 2014-01-29 14:28 ` rmansfield at qnx dot com
  2014-01-29 14:36 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rmansfield at qnx dot com @ 2014-01-29 14:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #24 from Ryan Mansfield <rmansfield at qnx dot com> ---
$ valgrind ./cc1 -fexceptions ~/conftest.c
==5295== Memcheck, a memory error detector
==5295== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==5295== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==5295== Command: ./cc1 -fexceptions /home/ryan/conftest.c
==5295== 
 foo
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary>
<whole-program> <inline>Assembling functions:
 foo==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0x82E9C4: mark_pseudo_regno_live(int) (sparseset.h:147)
==5295==    by 0x82FB2C: process_bb_node_lives(ira_loop_tree_node*)
(ira-lives.c:1321)
==5295==    by 0x8154ED: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void
(*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1831)
==5295==    by 0x830621: ira_create_allocno_live_ranges() (ira-lives.c:1610)
==5295==    by 0x816F7C: ira_build() (ira-build.c:3431)
==5295==    by 0x80F621: (anonymous namespace)::pass_ira::execute()
(ira.c:5311)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295==    by 0x644F19: finalize_compilation_unit() (cgraphunit.c:2319)
==5295== 
==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0x82E8AE: make_object_born(ira_object*) (sparseset.h:147)
==5295==    by 0x82E9E1: mark_pseudo_regno_live(int) (ira-lives.c:294)
==5295==    by 0x82FB2C: process_bb_node_lives(ira_loop_tree_node*)
(ira-lives.c:1321)
==5295==    by 0x8154ED: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void
(*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1831)
==5295==    by 0x830621: ira_create_allocno_live_ranges() (ira-lives.c:1610)
==5295==    by 0x816F7C: ira_build() (ira-build.c:3431)
==5295==    by 0x80F621: (anonymous namespace)::pass_ira::execute()
(ira.c:5311)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295== 
==5295== Use of uninitialised value of size 8
==5295==    at 0x82E9C9: mark_pseudo_regno_live(int) (sparseset.h:147)
==5295==    by 0x82FB2C: process_bb_node_lives(ira_loop_tree_node*)
(ira-lives.c:1321)
==5295==    by 0x8154ED: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void
(*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1831)
==5295==    by 0x830621: ira_create_allocno_live_ranges() (ira-lives.c:1610)
==5295==    by 0x816F7C: ira_build() (ira-build.c:3431)
==5295==    by 0x80F621: (anonymous namespace)::pass_ira::execute()
(ira.c:5311)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295==    by 0x644F19: finalize_compilation_unit() (cgraphunit.c:2319)
==5295== 
==5295== Use of uninitialised value of size 8
==5295==    at 0x82E900: make_object_born(ira_object*) (sparseset.h:147)
==5295==    by 0x82E9E1: mark_pseudo_regno_live(int) (ira-lives.c:294)
==5295==    by 0x82FB2C: process_bb_node_lives(ira_loop_tree_node*)
(ira-lives.c:1321)
==5295==    by 0x8154ED: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void
(*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1831)
==5295==    by 0x830621: ira_create_allocno_live_ranges() (ira-lives.c:1610)
==5295==    by 0x816F7C: ira_build() (ira-build.c:3431)
==5295==    by 0x80F621: (anonymous namespace)::pass_ira::execute()
(ira.c:5311)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295== 
==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0x82FDA8: process_bb_node_lives(ira_loop_tree_node*)
(sparseset.h:147)
==5295==    by 0x8154ED: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void
(*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1831)
==5295==    by 0x830621: ira_create_allocno_live_ranges() (ira-lives.c:1610)
==5295==    by 0x816F7C: ira_build() (ira-build.c:3431)
==5295==    by 0x80F621: (anonymous namespace)::pass_ira::execute()
(ira.c:5311)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295==    by 0x644F19: finalize_compilation_unit() (cgraphunit.c:2319)
==5295==    by 0x508C63: c_write_global_declarations() (c-decl.c:10401)
==5295== 
==5295== Use of uninitialised value of size 8
==5295==    at 0x82FC81: process_bb_node_lives(ira_loop_tree_node*)
(sparseset.h:147)
==5295==    by 0x8154ED: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void
(*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1831)
==5295==    by 0x830621: ira_create_allocno_live_ranges() (ira-lives.c:1610)
==5295==    by 0x816F7C: ira_build() (ira-build.c:3431)
==5295==    by 0x80F621: (anonymous namespace)::pass_ira::execute()
(ira.c:5311)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295==    by 0x644F19: finalize_compilation_unit() (cgraphunit.c:2319)
==5295==    by 0x508C63: c_write_global_declarations() (c-decl.c:10401)
==5295== 
==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0x5CAA95: ggc_internal_alloc_stat(unsigned long)
(ggc-page.c:1172)
==5295==    by 0x90C24A: rtvec_alloc(int) (rtl.c:150)
==5295==    by 0xC1108F: emit_multi_reg_push(unsigned long, unsigned long)
(arm.c:19645)
==5295==    by 0xC1424C: arm_expand_prologue() (arm.c:20871)
==5295==    by 0xC90D8F: gen_prologue() (arm.md:11838)
==5295==    by 0x774554: thread_prologue_and_epilogue_insns() (function.c:5937)
==5295==    by 0x776D02: (anonymous
namespace)::pass_thread_prologue_and_epilogue::execute() (function.c:6989)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295== 
==5295== Use of uninitialised value of size 8
==5295==    at 0x5CAC80: ggc_internal_alloc_stat(unsigned long)
(ggc-page.c:1174)
==5295==    by 0x90C24A: rtvec_alloc(int) (rtl.c:150)
==5295==    by 0xC1108F: emit_multi_reg_push(unsigned long, unsigned long)
(arm.c:19645)
==5295==    by 0xC1424C: arm_expand_prologue() (arm.c:20871)
==5295==    by 0xC90D8F: gen_prologue() (arm.md:11838)
==5295==    by 0x774554: thread_prologue_and_epilogue_insns() (function.c:5937)
==5295==    by 0x776D02: (anonymous
namespace)::pass_thread_prologue_and_epilogue::execute() (function.c:6989)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295== 
==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0x4C2FB39: memset (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5295==    by 0x90C25D: rtvec_alloc(int) (string3.h:84)
==5295==    by 0xC1108F: emit_multi_reg_push(unsigned long, unsigned long)
(arm.c:19645)
==5295==    by 0xC1424C: arm_expand_prologue() (arm.c:20871)
==5295==    by 0xC90D8F: gen_prologue() (arm.md:11838)
==5295==    by 0x774554: thread_prologue_and_epilogue_insns() (function.c:5937)
==5295==    by 0x776D02: (anonymous
namespace)::pass_thread_prologue_and_epilogue::execute() (function.c:6989)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295== 
==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0x4C2FB75: memset (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5295==    by 0x90C25D: rtvec_alloc(int) (string3.h:84)
==5295==    by 0xC1108F: emit_multi_reg_push(unsigned long, unsigned long)
(arm.c:19645)
==5295==    by 0xC1424C: arm_expand_prologue() (arm.c:20871)
==5295==    by 0xC90D8F: gen_prologue() (arm.md:11838)
==5295==    by 0x774554: thread_prologue_and_epilogue_insns() (function.c:5937)
==5295==    by 0x776D02: (anonymous
namespace)::pass_thread_prologue_and_epilogue::execute() (function.c:6989)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295== 
==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0x6C564E: mark_used_flags(rtx_def*, int) (emit-rtl.c:2925)
==5295==    by 0x6C562E: mark_used_flags(rtx_def*, int) (emit-rtl.c:2921)
==5295==    by 0x6C63E5: reset_insn_used_flags(rtx_def*) (emit-rtl.c:2938)
==5295==    by 0x6C642F: reset_all_used_flags() (emit-rtl.c:2627)
==5295==    by 0x6CA465: verify_rtl_sharing() (emit-rtl.c:2659)
==5295==    by 0x8B5FB4: execute_function_todo(void*) (passes.c:1863)
==5295==    by 0x8B6833: execute_todo(unsigned int) (passes.c:1887)
==5295==    by 0x8B89E4: execute_one_pass(opt_pass*) (passes.c:2243)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295== 
==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0x6C566B: mark_used_flags(rtx_def*, int) (emit-rtl.c:2925)
==5295==    by 0x6C562E: mark_used_flags(rtx_def*, int) (emit-rtl.c:2921)
==5295==    by 0x6C63E5: reset_insn_used_flags(rtx_def*) (emit-rtl.c:2938)
==5295==    by 0x6C642F: reset_all_used_flags() (emit-rtl.c:2627)
==5295==    by 0x6CA465: verify_rtl_sharing() (emit-rtl.c:2659)
==5295==    by 0x8B5FB4: execute_function_todo(void*) (passes.c:1863)
==5295==    by 0x8B6833: execute_todo(unsigned int) (passes.c:1887)
==5295==    by 0x8B89E4: execute_one_pass(opt_pass*) (passes.c:2243)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295== 
==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0x6C564E: mark_used_flags(rtx_def*, int) (emit-rtl.c:2925)
==5295==    by 0x6C562E: mark_used_flags(rtx_def*, int) (emit-rtl.c:2921)
==5295==    by 0x6C6395: verify_insn_sharing(rtx_def*) (emit-rtl.c:2938)
==5295==    by 0x6CA4DF: verify_rtl_sharing() (emit-rtl.c:2666)
==5295==    by 0x8B5FB4: execute_function_todo(void*) (passes.c:1863)
==5295==    by 0x8B6833: execute_todo(unsigned int) (passes.c:1887)
==5295==    by 0x8B89E4: execute_one_pass(opt_pass*) (passes.c:2243)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295== 
==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0x6C566B: mark_used_flags(rtx_def*, int) (emit-rtl.c:2925)
==5295==    by 0x6C562E: mark_used_flags(rtx_def*, int) (emit-rtl.c:2921)
==5295==    by 0x6C6395: verify_insn_sharing(rtx_def*) (emit-rtl.c:2938)
==5295==    by 0x6CA4DF: verify_rtl_sharing() (emit-rtl.c:2666)
==5295==    by 0x8B5FB4: execute_function_todo(void*) (passes.c:1863)
==5295==    by 0x8B6833: execute_todo(unsigned int) (passes.c:1887)
==5295==    by 0x8B89E4: execute_one_pass(opt_pass*) (passes.c:2243)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295== 
==5295== Conditional jump or move depends on uninitialised value(s)
==5295==    at 0xC2852E: arm_unwind_emit_sequence(_IO_FILE*, rtx_def*)
(arm.c:28713)
==5295==    by 0xC2905D: arm_unwind_emit(_IO_FILE*, rtx_def*) (arm.c:28969)
==5295==    by 0x70993E: final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
(final.c:2978)
==5295==    by 0x70A2E5: final(rtx_def*, _IO_FILE*, int) (final.c:2024)
==5295==    by 0x70A709: (anonymous namespace)::pass_final::execute()
(final.c:4438)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295==    by 0x644F19: finalize_compilation_unit() (cgraphunit.c:2319)
==5295== 
==5295== Use of uninitialised value of size 8
==5295==    at 0xC285D5: arm_unwind_emit_sequence(_IO_FILE*, rtx_def*)
(arm.c:28727)
==5295==    by 0xC2905D: arm_unwind_emit(_IO_FILE*, rtx_def*) (arm.c:28969)
==5295==    by 0x70993E: final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
(final.c:2978)
==5295==    by 0x70A2E5: final(rtx_def*, _IO_FILE*, int) (final.c:2024)
==5295==    by 0x70A709: (anonymous namespace)::pass_final::execute()
(final.c:4438)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295==    by 0x644F19: finalize_compilation_unit() (cgraphunit.c:2319)
==5295== 
==5295== Invalid read of size 8
==5295==    at 0xC285E2: arm_unwind_emit_sequence(_IO_FILE*, rtx_def*)
(arm.c:28728)
==5295==    by 0xC2905D: arm_unwind_emit(_IO_FILE*, rtx_def*) (arm.c:28969)
==5295==    by 0x70993E: final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
(final.c:2978)
==5295==    by 0x70A2E5: final(rtx_def*, _IO_FILE*, int) (final.c:2024)
==5295==    by 0x70A709: (anonymous namespace)::pass_final::execute()
(final.c:4438)
==5295==    by 0x8B8BC1: execute_one_pass(opt_pass*) (passes.c:2229)
==5295==    by 0x8B8E95: execute_pass_list(opt_pass*) (passes.c:2282)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x8B8EA7: execute_pass_list(opt_pass*) (passes.c:2283)
==5295==    by 0x642768: expand_function(cgraph_node*) (cgraphunit.c:1764)
==5295==    by 0x644BFF: compile() (cgraphunit.c:1996)
==5295==    by 0x644F19: finalize_compilation_unit() (cgraphunit.c:2319)
==5295==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==5295== 

/home/ryan/conftest.c: In function 'foo':
/home/ryan/conftest.c:7:1: internal compiler error: Segmentation fault
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
==5295== 
==5295== HEAP SUMMARY:
==5295==     in use at exit: 708,959 bytes in 2,884 blocks
==5295==   total heap usage: 5,404 allocs, 2,520 frees, 3,218,933 bytes
allocated
==5295== 
==5295== LEAK SUMMARY:
==5295==    definitely lost: 24 bytes in 1 blocks
==5295==    indirectly lost: 0 bytes in 0 blocks
==5295==      possibly lost: 13,617 bytes in 4 blocks
==5295==    still reachable: 695,318 bytes in 2,879 blocks
==5295==         suppressed: 0 bytes in 0 blocks
==5295== Rerun with --leak-check=full to see details of leaked memory
==5295== 
==5295== For counts of detected and suppressed errors, rerun with: -v
==5295== Use --track-origins=yes to see where uninitialised values come from
==5295== ERROR SUMMARY: 665 errors from 17 contexts (suppressed: 2 from 2)


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (23 preceding siblings ...)
  2014-01-29 14:28 ` rmansfield at qnx dot com
@ 2014-01-29 14:36 ` jakub at gcc dot gnu.org
  2014-01-29 14:54 ` rmansfield at qnx dot com
                   ` (8 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-29 14:36 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 13549 bytes --]

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31943|0                           |1
        is obsolete|                            |

--- Comment #26 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Comment on attachment 31943
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31943
gcc49-pr59575.patch

>2014-01-23  Jakub Jelinek  <jakub@redhat.com>
>
>	PR target/59575
>	* config/arm/arm.c (emit_multi_reg_push): Add dwarf_regs_mask argument,
>	don't record in REG_FRAME_RELATED_EXPR registers not set in that
>	bitmask.
>	(arm_expand_prologue): Adjust all callers.
>	(arm_unwind_emit_sequence): Allow saved, but not important for unwind
>	info, registers also at the lowest numbered registers side.  Use
>	gcc_assert instead of abort, and SET_SRC/SET_DEST macros instead of
>	XEXP.
>
>	* gcc.target/arm/pr59575.c: New test.
>
>--- gcc/config/arm/arm.c.jj	2014-01-17 15:16:14.000000000 +0100
>+++ gcc/config/arm/arm.c	2014-01-24 09:16:41.949843665 +0100
>@@ -177,7 +177,7 @@ static rtx arm_expand_builtin (tree, rtx
> static tree arm_builtin_decl (unsigned, bool);
> static void emit_constant_insn (rtx cond, rtx pattern);
> static rtx emit_set_insn (rtx, rtx);
>-static rtx emit_multi_reg_push (unsigned long);
>+static rtx emit_multi_reg_push (unsigned long, unsigned long);
> static int arm_arg_partial_bytes (cumulative_args_t, enum machine_mode,
> 				  tree, bool);
> static rtx arm_function_arg (cumulative_args_t, enum machine_mode,
>@@ -19574,9 +19574,11 @@ arm_emit_strd_push (unsigned long saved_
> /* Generate and emit an insn that we will recognize as a push_multi.
>    Unfortunately, since this insn does not reflect very well the actual
>    semantics of the operation, we need to annotate the insn for the benefit
>-   of DWARF2 frame unwind information.  */
>+   of DWARF2 frame unwind information.  DWARF_REGS_MASK is a subset of
>+   MASK for registers that should be annotated for DWARF2 frame unwind
>+   information.  */
> static rtx
>-emit_multi_reg_push (unsigned long mask)
>+emit_multi_reg_push (unsigned long mask, unsigned long dwarf_regs_mask)
> {
>   int num_regs = 0;
>   int num_dwarf_regs;
>@@ -19586,16 +19588,19 @@ emit_multi_reg_push (unsigned long mask)
>   int dwarf_par_index;
>   rtx tmp, reg;
> 
>+  /* We don't record the PC in the dwarf frame information.  */
>+  dwarf_regs_mask &= ~(1 << PC_REGNUM);
>+
>   for (i = 0; i <= LAST_ARM_REGNUM; i++)
>-    if (mask & (1 << i))
>-      num_regs++;
>+    {
>+      if (mask & (1 << i))
>+	num_regs++;
>+      if (dwarf_regs_mask & (1 << i))
>+	num_dwarf_regs++;
>+    }
> 
>   gcc_assert (num_regs && num_regs <= 16);
>-
>-  /* We don't record the PC in the dwarf frame information.  */
>-  num_dwarf_regs = num_regs;
>-  if (mask & (1 << PC_REGNUM))
>-    num_dwarf_regs--;
>+  gcc_assert ((dwarf_regs_mask & ~mask) == 0);
> 
>   /* For the body of the insn we are going to generate an UNSPEC in
>      parallel with several USEs.  This allows the insn to be recognized
>@@ -19661,14 +19666,13 @@ emit_multi_reg_push (unsigned long mask)
> 					   gen_rtvec (1, reg),
> 					   UNSPEC_PUSH_MULT));
> 
>-	  if (i != PC_REGNUM)
>+	  if (dwarf_regs_mask & (1 << i))
> 	    {
> 	      tmp = gen_rtx_SET (VOIDmode,
> 				 gen_frame_mem (SImode, stack_pointer_rtx),
> 				 reg);
> 	      RTX_FRAME_RELATED_P (tmp) = 1;
>-	      XVECEXP (dwarf, 0, dwarf_par_index) = tmp;
>-	      dwarf_par_index++;
>+	      XVECEXP (dwarf, 0, dwarf_par_index++) = tmp;
> 	    }
> 
> 	  break;
>@@ -19683,7 +19687,7 @@ emit_multi_reg_push (unsigned long mask)
> 
> 	  XVECEXP (par, 0, j) = gen_rtx_USE (VOIDmode, reg);
> 
>-	  if (i != PC_REGNUM)
>+	  if (dwarf_regs_mask & (1 << i))
> 	    {
> 	      tmp
> 		= gen_rtx_SET (VOIDmode,
>@@ -20690,7 +20694,7 @@ arm_expand_prologue (void)
> 	  /* Interrupt functions must not corrupt any registers.
> 	     Creating a frame pointer however, corrupts the IP
> 	     register, so we must push it first.  */
>-	  emit_multi_reg_push (1 << IP_REGNUM);
>+	  emit_multi_reg_push (1 << IP_REGNUM, 1 << IP_REGNUM);
> 
> 	  /* Do not set RTX_FRAME_RELATED_P on this insn.
> 	     The dwarf stack unwinding code only wants to see one
>@@ -20751,7 +20755,8 @@ arm_expand_prologue (void)
> 	      if (cfun->machine->uses_anonymous_args)
> 		{
> 		  insn
>-		    = emit_multi_reg_push ((0xf0 >> (args_to_push / 4)) & 0xf);
>+		    = emit_multi_reg_push ((0xf0 >> (args_to_push / 4)) & 0xf,
>+					   (0xf0 >> (args_to_push / 4)) & 0xf);
> 		  emit_set_insn (gen_rtx_REG (SImode, 3), ip_rtx);
> 		  saved_pretend_args = 1;
> 		}
>@@ -20795,7 +20800,8 @@ arm_expand_prologue (void)
>       /* Push the argument registers, or reserve space for them.  */
>       if (cfun->machine->uses_anonymous_args)
> 	insn = emit_multi_reg_push
>-	  ((0xf0 >> (args_to_push / 4)) & 0xf);
>+	  ((0xf0 >> (args_to_push / 4)) & 0xf,
>+	   (0xf0 >> (args_to_push / 4)) & 0xf);
>       else
> 	insn = emit_insn
> 	  (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
>@@ -20820,6 +20826,8 @@ arm_expand_prologue (void)
> 
>   if (live_regs_mask)
>     {
>+      unsigned long dwarf_regs_mask = live_regs_mask;
>+
>       saved_regs += bit_count (live_regs_mask) * 4;
>       if (optimize_size && !frame_pointer_needed
> 	  && saved_regs == offsets->saved_regs - offsets->saved_args)
>@@ -20846,25 +20854,22 @@ arm_expand_prologue (void)
> 	  && current_tune->prefer_ldrd_strd
>           && !optimize_function_for_size_p (cfun))
>         {
>+	  gcc_checking_assert (live_regs_mask == dwarf_regs_mask);
>           if (TARGET_THUMB2)
>-            {
>-              thumb2_emit_strd_push (live_regs_mask);
>-            }
>+	    thumb2_emit_strd_push (live_regs_mask);
>           else if (TARGET_ARM
>                    && !TARGET_APCS_FRAME
>                    && !IS_INTERRUPT (func_type))
>-            {
>-              arm_emit_strd_push (live_regs_mask);
>-            }
>+	    arm_emit_strd_push (live_regs_mask);
>           else
>             {
>-              insn = emit_multi_reg_push (live_regs_mask);
>+	      insn = emit_multi_reg_push (live_regs_mask, live_regs_mask);
>               RTX_FRAME_RELATED_P (insn) = 1;
>             }
>         }
>       else
>         {
>-          insn = emit_multi_reg_push (live_regs_mask);
>+	  insn = emit_multi_reg_push (live_regs_mask, dwarf_regs_mask);
>           RTX_FRAME_RELATED_P (insn) = 1;
>         }
>     }
>@@ -28692,32 +28697,43 @@ arm_unwind_emit_sequence (FILE * asm_out
>   int reg_size;
>   unsigned reg;
>   unsigned lastreg;
>+  unsigned padfirst = 0, padlast = 0;
>   rtx e;
> 
>   e = XVECEXP (p, 0, 0);
>-  if (GET_CODE (e) != SET)
>-    abort ();
>+  gcc_assert (GET_CODE (e) == SET);
> 
>   /* First insn will adjust the stack pointer.  */
>-  if (GET_CODE (e) != SET
>-      || !REG_P (XEXP (e, 0))
>-      || REGNO (XEXP (e, 0)) != SP_REGNUM
>-      || GET_CODE (XEXP (e, 1)) != PLUS)
>-    abort ();
>+  gcc_assert (GET_CODE (e) == SET
>+	      && REG_P (SET_DEST (e))
>+	      && REGNO (SET_DEST (e)) == SP_REGNUM
>+	      && GET_CODE (SET_SRC (e)) == PLUS);
> 
>-  offset = -INTVAL (XEXP (XEXP (e, 1), 1));
>+  offset = -INTVAL (XEXP (SET_SRC (e), 1));
>   nregs = XVECLEN (p, 0) - 1;
>+  gcc_assert (nregs);
> 
>-  reg = REGNO (XEXP (XVECEXP (p, 0, 1), 1));
>+  reg = REGNO (SET_SRC (XVECEXP (p, 0, 1)));
>   if (reg < 16)
>     {
>+      /* For -Os dummy registers can be pushed at the beginning to
>+	 avoid separate stack pointer adjustment.  */
>+      e = XVECEXP (p, 0, 1);
>+      e = XEXP (SET_DEST (e), 0);
>+      if (GET_CODE (e) == PLUS)
>+	padfirst = INTVAL (XEXP (e, 1));
>+      gcc_assert (padfirst == 0 || optimize_size);
>       /* The function prologue may also push pc, but not annotate it as it is
> 	 never restored.  We turn this into a stack pointer adjustment.  */
>-      if (nregs * 4 == offset - 4)
>-	{
>-	  fprintf (asm_out_file, "\t.pad #4\n");
>-	  offset -= 4;
>-	}
>+      e = XVECEXP (p, 0, nregs);
>+      e = XEXP (SET_DEST (e), 0);
>+      if (GET_CODE (e) == PLUS)
>+	padlast = offset - INTVAL (XEXP (e, 1)) - 4;
>+      else
>+	padlast = offset - 4;
>+      gcc_assert (padlast == 0 || padlast == 4);
>+      if (padlast == 4)
>+	fprintf (asm_out_file, "\t.pad #4\n");
>       reg_size = 4;
>       fprintf (asm_out_file, "\t.save {");
>     }
>@@ -28728,14 +28744,13 @@ arm_unwind_emit_sequence (FILE * asm_out
>     }
>   else
>     /* Unknown register type.  */
>-    abort ();
>+    gcc_unreachable ();
> 
>   /* If the stack increment doesn't match the size of the saved registers,
>      something has gone horribly wrong.  */
>-  if (offset != nregs * reg_size)
>-    abort ();
>+  gcc_assert (offset == padfirst + nregs * reg_size + padlast);
> 
>-  offset = 0;
>+  offset = padfirst;
>   lastreg = 0;
>   /* The remaining insns will describe the stores.  */
>   for (i = 1; i <= nregs; i++)
>@@ -28743,14 +28758,12 @@ arm_unwind_emit_sequence (FILE * asm_out
>       /* Expect (set (mem <addr>) (reg)).
>          Where <addr> is (reg:SP) or (plus (reg:SP) (const_int)).  */
>       e = XVECEXP (p, 0, i);
>-      if (GET_CODE (e) != SET
>-	  || !MEM_P (XEXP (e, 0))
>-	  || !REG_P (XEXP (e, 1)))
>-	abort ();
>-
>-      reg = REGNO (XEXP (e, 1));
>-      if (reg < lastreg)
>-	abort ();
>+      gcc_assert (GET_CODE (e) == SET
>+		  && MEM_P (SET_DEST (e))
>+		  && REG_P (SET_SRC (e)));
>+
>+      reg = REGNO (SET_SRC (e));
>+      gcc_assert (reg >= lastreg);
> 
>       if (i != 1)
> 	fprintf (asm_out_file, ", ");
>@@ -28763,23 +28776,22 @@ arm_unwind_emit_sequence (FILE * asm_out
> 
> #ifdef ENABLE_CHECKING
>       /* Check that the addresses are consecutive.  */
>-      e = XEXP (XEXP (e, 0), 0);
>+      e = XEXP (SET_DEST (e), 0);
>       if (GET_CODE (e) == PLUS)
>-	{
>-	  offset += reg_size;
>-	  if (!REG_P (XEXP (e, 0))
>-	      || REGNO (XEXP (e, 0)) != SP_REGNUM
>-	      || !CONST_INT_P (XEXP (e, 1))
>-	      || offset != INTVAL (XEXP (e, 1)))
>-	    abort ();
>-	}
>-      else if (i != 1
>-	       || !REG_P (e)
>-	       || REGNO (e) != SP_REGNUM)
>-	abort ();
>+	gcc_assert (REG_P (XEXP (e, 0))
>+		    && REGNO (XEXP (e, 0)) == SP_REGNUM
>+		    && CONST_INT_P (XEXP (e, 1))
>+		    && offset == INTVAL (XEXP (e, 1)));
>+      else
>+	gcc_assert (i == 1
>+		    && REG_P (e)
>+		    && REGNO (e) == SP_REGNUM);
>+      offset += reg_size;
> #endif
>     }
>   fprintf (asm_out_file, "}\n");
>+  if (padfirst)
>+    fprintf (asm_out_file, "\t.pad #%d\n", padfirst);
> }
> 
> /*  Emit unwind directives for a SET.  */
>--- gcc/testsuite/gcc.target/arm/pr59575.c.jj	2014-01-23 15:54:25.959922593 +0100
>+++ gcc/testsuite/gcc.target/arm/pr59575.c	2014-01-23 15:54:12.000000000 +0100
>@@ -0,0 +1,15 @@
>+/* PR target/59575 */
>+/* { dg-do compile } */
>+/* { dg-options "-Os -g -march=armv7-a" } */
>+
>+void foo (int *);
>+int *bar (int, long long, int);
>+
>+void
>+test (int *p)
>+{
>+  if (p)
>+    foo (p);
>+  else if (p = bar (0, 1, 2))
>+    foo (p);
>+}
>From gcc-bugs-return-441896-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 29 14:36:09 2014
Return-Path: <gcc-bugs-return-441896-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7924 invoked by alias); 29 Jan 2014 14:36:08 -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 7857 invoked by uid 48); 29 Jan 2014 14:36:05 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
Date: Wed, 29 Jan 2014 14:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: debug
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-59575-4-1mI3ss4Vh2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59575-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59575-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/msg03038.txt.bz2
Content-length: 311

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

--- Comment #25 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 31980
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id1980&actioníit
gcc49-pr59575.patch

Ah, of course, you're right, num_dwarf_regs is uninitialized.  Fixed thusly.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (24 preceding siblings ...)
  2014-01-29 14:36 ` jakub at gcc dot gnu.org
@ 2014-01-29 14:54 ` rmansfield at qnx dot com
  2014-01-29 14:58 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rmansfield at qnx dot com @ 2014-01-29 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #27 from Ryan Mansfield <rmansfield at qnx dot com> ---
(In reply to Jakub Jelinek from comment #25)
> Created attachment 31980 [details]
> gcc49-pr59575.patch
> 
> Ah, of course, you're right, num_dwarf_regs is uninitialized.  Fixed thusly.

Yep, that fixes the ICE. Thanks


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (25 preceding siblings ...)
  2014-01-29 14:54 ` rmansfield at qnx dot com
@ 2014-01-29 14:58 ` jakub at gcc dot gnu.org
  2014-01-29 15:58 ` rmansfield at qnx dot com
                   ` (6 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-29 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Ryan Mansfield from comment #27)
> Yep, that fixes the ICE. Thanks

Could you please bootstrap/regtest it if you have hw for that?


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (26 preceding siblings ...)
  2014-01-29 14:58 ` jakub at gcc dot gnu.org
@ 2014-01-29 15:58 ` rmansfield at qnx dot com
  2014-01-30 20:20 ` ktkachov at gcc dot gnu.org
                   ` (5 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rmansfield at qnx dot com @ 2014-01-29 15:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #29 from Ryan Mansfield <rmansfield at qnx dot com> ---
(In reply to Jakub Jelinek from comment #28)
> (In reply to Ryan Mansfield from comment #27)
> > Yep, that fixes the ICE. Thanks
> 
> Could you please bootstrap/regtest it if you have hw for that?

Yep, I can, it just will take me a bit as I don't have an
arm-unknown-linux-gnueabi up and running right now. I found this original ICE
on an (unsupported) qnx armeabi target.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (27 preceding siblings ...)
  2014-01-29 15:58 ` rmansfield at qnx dot com
@ 2014-01-30 20:20 ` ktkachov at gcc dot gnu.org
  2014-01-31 11:21 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-01-30 20:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #30 from ktkachov at gcc dot gnu.org ---
Patch bootstrapped ok on arm-none-linux-gnueabihf configured
--with-arch=armv7-a --with-fpu=neon-vfpv4 --with-mode=thumb --with-float=hard
--enable-languages=c,c++,fortran

Passed regtest too.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (28 preceding siblings ...)
  2014-01-30 20:20 ` ktkachov at gcc dot gnu.org
@ 2014-01-31 11:21 ` rguenth at gcc dot gnu.org
  2014-02-05 18:55 ` rth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-01-31 11:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (29 preceding siblings ...)
  2014-01-31 11:21 ` rguenth at gcc dot gnu.org
@ 2014-02-05 18:55 ` rth at gcc dot gnu.org
  2014-02-06 15:52 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  33 siblings, 0 replies; 34+ messages in thread
From: rth at gcc dot gnu.org @ 2014-02-05 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

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

--- Comment #31 from Richard Henderson <rth at gcc dot gnu.org> ---
Whoops, took assignment before I finished reading the log.
Jakub has this well in hand.

FWIW, the patch looks good to me, but I guess an ARM maintainer
should approve it.


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (30 preceding siblings ...)
  2014-02-05 18:55 ` rth at gcc dot gnu.org
@ 2014-02-06 15:52 ` jakub at gcc dot gnu.org
  2014-02-06 15:53 ` jakub at gcc dot gnu.org
  2014-02-06 16:06 ` jakub at gcc dot gnu.org
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-06 15:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #32 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Feb  6 15:52:17 2014
New Revision: 207563

URL: http://gcc.gnu.org/viewcvs?rev=207563&root=gcc&view=rev
Log:
    PR target/59575
    * config/arm/arm.c (emit_multi_reg_push): Add dwarf_regs_mask argument,
    don't record in REG_FRAME_RELATED_EXPR registers not set in that
    bitmask.
    (arm_expand_prologue): Adjust all callers.
    (arm_unwind_emit_sequence): Allow saved, but not important for unwind
    info, registers also at the lowest numbered registers side.  Use
    gcc_assert instead of abort, and SET_SRC/SET_DEST macros instead of
    XEXP.

    * gcc.target/arm/pr59575.c: New test.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/arm.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (31 preceding siblings ...)
  2014-02-06 15:52 ` jakub at gcc dot gnu.org
@ 2014-02-06 15:53 ` jakub at gcc dot gnu.org
  2014-02-06 16:06 ` jakub at gcc dot gnu.org
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-06 15:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #33 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Feb  6 15:52:36 2014
New Revision: 207564

URL: http://gcc.gnu.org/viewcvs?rev=207564&root=gcc&view=rev
Log:
    PR target/59575
    * config/arm/arm.c (emit_multi_reg_push): Add dwarf_regs_mask argument,
    don't record in REG_FRAME_RELATED_EXPR registers not set in that
    bitmask.
    (arm_expand_prologue): Adjust all callers.
    (arm_unwind_emit_sequence): Allow saved, but not important for unwind
    info, registers also at the lowest numbered registers side.  Use
    gcc_assert instead of abort, and SET_SRC/SET_DEST macros instead of
    XEXP.

    * gcc.target/arm/pr59575.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/arm/pr59575.c


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

* [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239
       [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
                   ` (32 preceding siblings ...)
  2014-02-06 15:53 ` jakub at gcc dot gnu.org
@ 2014-02-06 16:06 ` jakub at gcc dot gnu.org
  33 siblings, 0 replies; 34+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-06 16:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #34 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2014-02-06 16:06 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-59575-4@http.gcc.gnu.org/bugzilla/>
2013-12-27 14:15 ` [Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239 hubicka at gcc dot gnu.org
2013-12-30 13:48 ` hubicka at gcc dot gnu.org
2013-12-30 14:03 ` hubicka at gcc dot gnu.org
2013-12-30 20:31 ` hubicka at gcc dot gnu.org
2013-12-30 21:15 ` hubicka at gcc dot gnu.org
2014-01-07 11:53 ` rguenth at gcc dot gnu.org
2014-01-22 20:03 ` jakub at gcc dot gnu.org
2014-01-23 15:40 ` jakub at gcc dot gnu.org
2014-01-23 15:41 ` jakub at gcc dot gnu.org
2014-01-23 17:37 ` rmansfield at qnx dot com
2014-01-23 17:47 ` jakub at gcc dot gnu.org
2014-01-23 17:53 ` rmansfield at qnx dot com
2014-01-23 20:24 ` jakub at gcc dot gnu.org
2014-01-23 20:27 ` jakub at gcc dot gnu.org
2014-01-24  8:26 ` jakub at gcc dot gnu.org
2014-01-26 16:35 ` rmansfield at qnx dot com
2014-01-26 20:19 ` jakub at gcc dot gnu.org
2014-01-26 20:22 ` rmansfield at qnx dot com
2014-01-27  8:08 ` jakub at gcc dot gnu.org
2014-01-28 21:20 ` rmansfield at qnx dot com
2014-01-28 23:29 ` jakub at gcc dot gnu.org
2014-01-29 13:19 ` jakub at gcc dot gnu.org
2014-01-29 14:13 ` rmansfield at qnx dot com
2014-01-29 14:28 ` rmansfield at qnx dot com
2014-01-29 14:36 ` jakub at gcc dot gnu.org
2014-01-29 14:54 ` rmansfield at qnx dot com
2014-01-29 14:58 ` jakub at gcc dot gnu.org
2014-01-29 15:58 ` rmansfield at qnx dot com
2014-01-30 20:20 ` ktkachov at gcc dot gnu.org
2014-01-31 11:21 ` rguenth at gcc dot gnu.org
2014-02-05 18:55 ` rth at gcc dot gnu.org
2014-02-06 15:52 ` jakub at gcc dot gnu.org
2014-02-06 15:53 ` jakub at gcc dot gnu.org
2014-02-06 16:06 ` 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).