[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-08-07 Thread danglin at gcc dot gnu dot org


--- Comment #19 from danglin at gcc dot gnu dot org  2010-08-07 20:26 
---
Fixed.


-- 

danglin at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-08-02 Thread bernds at gcc dot gnu dot org


--- Comment #18 from bernds at gcc dot gnu dot org  2010-08-02 20:18 ---
Subject: Bug 45063

Author: bernds
Date: Mon Aug  2 20:17:59 2010
New Revision: 162828

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162828
Log:
PR target/45063
* caller-save.c (save_call_clobbered_regs): Remove regs from
hard_regs_saved when they are set.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/caller-save.c


-- 


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-30 Thread sje at cup dot hp dot com


--- Comment #16 from sje at cup dot hp dot com  2010-07-30 18:33 ---
I just tried the patch in comment #15 and successfully bootstrapped GCC on my
32 bit PA system (including building matmul_i1.c).  This was on ToT (r162716).


-- 

sje at cup dot hp dot com changed:

   What|Removed |Added

 CC||sje at cup dot hp dot com


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-30 Thread dave at hiauly1 dot hia dot nrc dot ca


--- Comment #17 from dave at hiauly1 dot hia dot nrc dot ca  2010-07-30 
19:20 ---
Subject: Re:  [4.6 Regression] ICE: Segmentation fault (cc1) compiling
matmul_i1.c

 I just tried the patch in comment #15 and successfully bootstrapped GCC on my
 32 bit PA system (including building matmul_i1.c).  This was on ToT (r162716).

I had a dce problem on hppa2.0w-hp-hpux11.11 building libjava.  On linux,
there are a number of new fortran testsuite errors.

Dave


-- 


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-29 Thread bernds at gcc dot gnu dot org


--- Comment #15 from bernds at gcc dot gnu dot org  2010-07-29 13:49 ---
Created an attachment (id=21349)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21349action=view)
Potential fix

Could you verify that this fixes it?


-- 

bernds at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |bernds at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread danglin at gcc dot gnu dot org


--- Comment #5 from danglin at gcc dot gnu dot org  2010-07-28 15:00 ---
(In reply to comment #4)
 While the ICE nominally results from a hash lookup failure, replacing
 libiberty.a with the stage1 version makes no difference.  Thus, it
 doesn't appear that the problem is with the hash code.

This is wrong.  Hash related failure is different bug.  The backtrace
for this ICE is:

Program received signal SIGSEGV, Segmentation fault.
commutative_operand_precedence (op=0x0) at ../../gcc/gcc/rtlanal.c:2914
2914  enum rtx_code code = GET_CODE (op);
(gdb) bt
#0  commutative_operand_precedence (op=0x0) at ../../gcc/gcc/rtlanal.c:2914
#1  0x003b135c in swap_commutative_operands_p (x=value optimized out, y=0x0)
at ../../gcc/gcc/rtlanal.c:2980
#2  0x003ee244 in simplify_const_relational_operation (code=NE, mode=SImode, 
op0=0x400122b8, op1=0x0) at ../../gcc/gcc/simplify-rtx.c:4256
#3  0x003e4ee0 in simplify_relational_operation (code=NE, mode=SImode, 
cmp_mode=SImode, op0=0x400122b8, op1=0x0)
at ../../gcc/gcc/simplify-rtx.c:3904
#4  0x003e565c in simplify_gen_relational (code=NE, mode=VOIDmode, 
cmp_mode=value optimized out, op0=0x400122b8, op1=0x0)
at ../../gcc/gcc/simplify-rtx.c:346
#5  0x00317ec4 in iv_number_of_iterations (loop=0x7, desc=0x9b62d8)
at ../../gcc/gcc/loop-iv.c:2609
#6  check_simple_exit (loop=0x7, desc=0x9b62d8) at ../../gcc/gcc/loop-iv.c:2847
#7  find_simple_exit (loop=0x7, desc=0x9b62d8) at ../../gcc/gcc/loop-iv.c:2872

(gdb) p/x $pc
$2 = 0x3b11d8
(gdb) disass 0x3b11c8,0x3b11e8
Dump of assembler code from 0x3b11c8 to 0x3b11e8:
   0x003b11c8 regno_use_in+276:   ldo -4(r7),r7
   0x003b11cc regno_use_in+280:   b,l 0x3b10f8 regno_use_in+68,r0
   0x003b11d0 regno_use_in+284:   ldi 0,ret0
   0x003b11d4 commutative_operand_precedence+0:   stw rp,-14(sp)
= 0x003b11d8 commutative_operand_precedence+4:   ldh 0(r26),r19
   0x003b11dc commutative_operand_precedence+8:   ldo 40(sp),sp
   0x003b11e0 commutative_operand_precedence+12:  ldi 1e,r20
   0x003b11e4 commutative_operand_precedence+16:  cmpb,
r20,r19,0x3b11f8 commutative_operand_precedence+36
End of assembler dump.
(gdb) p/x $r26
$3 = 0x0

ICE also seen on hppa2.0w-hp-hpux11.11.


-- 

danglin at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu dot
   ||org
  GCC build triplet|hppa-unknown-linux-gnu  |hppa*-*-* (32-bit)
   GCC host triplet|hppa-unknown-linux-gnu  |hppa*-*-* (32-bit)
 GCC target triplet|hppa-unknown-linux-gnu  |hppa*-*-* (32-bit)


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread danglin at gcc dot gnu dot org


--- Comment #6 from danglin at gcc dot gnu dot org  2010-07-28 15:15 ---
2609  assumption = simplify_gen_relational (NE, SImode, mode, tmp,
const0_rtx);

For some reason, 0 is being passed instead of const0_rtx.


-- 


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread danglin at gcc dot gnu dot org


--- Comment #7 from danglin at gcc dot gnu dot org  2010-07-28 15:33 ---
   0x00317ea8 find_simple_exit+5636:  ldw -cc(sp),r19
   0x00317eac find_simple_exit+5640:  copy ret0,r23
   0x00317eb0 find_simple_exit+5644:  stw r19,-34(sp)
   0x00317eb4 find_simple_exit+5648:  copy r5,r24
   0x00317eb8 find_simple_exit+5652:  ldi 50,r26
   0x00317ebc find_simple_exit+5656:  b,l 0x30d394,rp
   0x00317ec0 find_simple_exit+5660:  ldi 7,r25

The op1 value is loaded from the stack frame at -0xcc.  The
frame value appears to be set here:

   0x00317e48 find_simple_exit+5540:  stw r19,-cc(sp)

Breakpoint 3, 0x00317e48 in iv_number_of_iterations (loop=0x40296580, 
desc=0x9b62d8) at ../../gcc/gcc/loop-iv.c:2605
2605  bound = GEN_INT (((unsigned HOST_WIDEST_INT) 1  (size - 1 ) 
1) - 1);
(gdb) p/x $r19
$10 = 0x0
(gdb) p size
$11 = 31


-- 


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread bernds at gcc dot gnu dot org


--- Comment #8 from bernds at gcc dot gnu dot org  2010-07-28 15:46 ---
It sounds like the compiler is being miscompiled?  If so, it's probably not
helpful trying to debug the miscompiled compiler binary.  The best way to debug
this would be to produce one working build and one failing build of the
compiler, then narrow down which file is being miscompiled by copying over
object files from one directory to another.  You may have a candidate already
in the code you're looking at.

Once that's identified, please attach a .i of the file that's being
miscompiled, and the exact command line options to give cc1 to reproduce the
miscompilation.  A set of good/bad .s files might also help.


-- 


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread dave at hiauly1 dot hia dot nrc dot ca


--- Comment #9 from dave at hiauly1 dot hia dot nrc dot ca  2010-07-28 
19:18 ---
Subject: Re:  [4.6 Regression] ICE: Segmentation fault
(cc1) compiling matmul_i1.c

Replacing stage2/stage3 version of loop-iv.o with stage1 version results
in successful compilation of matmul_i1.c.

Attached .i, .s and cc command for loop-iv.c.  I annotated the .s in a
couple of locations, indicating the areas that cause the ICE.  As noted
in comment #6, 0 is passed instead of const0_rtx in the fifth argument
of the call to simplify_gen_relational at line 2609.

Dave


--- Comment #10 from dave at hiauly1 dot hia dot nrc dot ca  2010-07-28 
19:18 ---
Created an attachment (id=21342)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21342action=view)


--- Comment #11 from dave at hiauly1 dot hia dot nrc dot ca  2010-07-28 
19:18 ---
Created an attachment (id=21343)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21343action=view)


--- Comment #12 from dave at hiauly1 dot hia dot nrc dot ca  2010-07-28 
19:18 ---
Created an attachment (id=21344)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21344action=view)


-- 


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread danglin at gcc dot gnu dot org


--- Comment #13 from danglin at gcc dot gnu dot org  2010-07-28 20:21 
---
RTL seems to go wrong in ira.  We have after sched1:

(insn 1311 1308 1312 134 (set (reg/f:SI 926 [ const_int_rtx+256 ])   
(mem/s/f:SI (plus:SI (reg/f:SI 1207)(const_int 256 [0x100])) [3
const_int_rtx+256 S4 A32])) ../../gcc/gcc/loop-iv.c:2609 37 {*pa.md:2102}
 (expr_list:REG_EQUAL (mem/s/f:SI (const:SI (plus:SI (symbol_ref:SI
(const_int_rtx) [flags 0x240]  var_decl 0x40836b40 const_int_rtx)
(const_int 256 [0x100]))) [3 const_int_rtx+256 S4 A32])
(nil)))

(insn 1312 1311 1315 134 (set (mem:SI (plus:SI (reg/f:SI 30 %r30)
(const_int -52 [0xffcc])) [0 S4 A32])
(reg/f:SI 926 [ const_int_rtx+256 ])) ../../gcc/gcc/loop-iv.c:2609 37
{*pa.md:2102}
 (expr_list:REG_DEAD (reg/f:SI 926 [ const_int_rtx+256 ])
(nil)))

We have after ira:

(insn 1311 1308 2909 134 (set (reg/f:SI 19 %r19 [orig:926 const_int_rtx+256 ]
[926])(mem/s/f:SI (plus:SI (reg/f:SI 12 %r12 [1207])   
(const_int 256 [0x100])) [3 const_int_rtx+256 S4 A32]))
../../gcc/gcc/loop-iv.c:2609 37 {*pa.md:2102}
 (expr_list:REG_EQUIV (mem/s/f:SI (plus:SI (reg/f:SI 12 %r12 [1207])
(const_int 256 [0x100])) [3 const_int_rtx+256 S4 A32])
(expr_list:REG_EQUAL (mem/s/f:SI (const:SI (plus:SI (symbol_ref:SI
(const_int_rtx) [flags 0x240]  var_decl 0x40836b40 const_int_rtx)
(const_int 256 [0x100]))) [3 const_int_rtx+256 S4 A32])
(nil

(insn 2909 1311 1312 134 (set (reg:SI 19 %r19)
(mem/c:SI (plus:SI (reg/f:SI 30 %r30)
(const_int -204 [0xff34])) [84 S4 A32]))
../../gcc/gcc/loop-iv.c:2609 37 {*pa.md:2102}
 (nil))

(insn 1312 2909 1315 134 (set (mem:SI (plus:SI (reg/f:SI 30 %r30)
(const_int -52 [0xffcc])) [0 S4 A32])
(reg/f:SI 19 %r19 [orig:926 const_int_rtx+256 ] [926]))
../../gcc/gcc/loop-iv.c:2609 37 {*pa.md:2102}
 (nil))


-- 


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-28 Thread bernds at gcc dot gnu dot org


--- Comment #14 from bernds at gcc dot gnu dot org  2010-07-28 22:14 ---
That seems to be helpful - thank you.  I think I can reproduce it: insn 2909 is
generated during save_call_clobbered_regs, and I think I see how it relates to
revision 162418.  I hope to have a fix tomorrow or Friday.


-- 


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-27 Thread danglin at gcc dot gnu dot org


--- Comment #4 from danglin at gcc dot gnu dot org  2010-07-27 23:19 ---
Introduced in revision 162418.  Don't see any difference in gcc (C)
testresults for 162417 (full bootstrap) and 162418 (--disable-bootstrap).

While the ICE nominally results from a hash lookup failure, replacing
libiberty.a with the stage1 version makes no difference.  Thus, it
doesn't appear that the problem is with the hash code.


-- 

danglin at gcc dot gnu dot org changed:

   What|Removed |Added

  GCC build triplet|hppa-unknown-linu-gnu   |hppa-unknown-linux-gnu
   GCC host triplet|hppa-unknown-linu-gnu   |hppa-unknown-linux-gnu
 GCC target triplet|hppa-unknown-linu-gnu   |hppa-unknown-linux-gnu


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-24 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2010-07-24 21:42 ---
Please attach preprocessed source.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||build
Summary|ICE: Segmentation fault |[4.6 Regression] ICE:
   |(cc1) compiling matmul_i1.c |Segmentation fault (cc1)
   ||compiling matmul_i1.c
   Target Milestone|--- |4.6.0


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



[Bug target/45063] [4.6 Regression] ICE: Segmentation fault (cc1) compiling matmul_i1.c

2010-07-24 Thread dave at hiauly1 dot hia dot nrc dot ca


--- Comment #2 from dave at hiauly1 dot hia dot nrc dot ca  2010-07-24 
21:52 ---
Subject: Re:  [4.6 Regression] ICE: Segmentation fault
(cc1) compiling matmul_i1.c

On Sat, 24 Jul 2010, rguenth at gcc dot gnu dot org wrote:

 Please attach preprocessed source.

Attached.  However, ICE doesn't occur with stage1.

Dave


--- Comment #3 from dave at hiauly1 dot hia dot nrc dot ca  2010-07-24 
21:52 ---
Created an attachment (id=21304)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21304action=view)


-- 


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