public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/24226]  New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
@ 2005-10-06  8:39 rguenth at gcc dot gnu dot org
  2005-10-06  8:40 ` [Bug tree-optimization/24226] " rguenth at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-06  8:39 UTC (permalink / raw)
  To: gcc-bugs

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

/usr/lib/gcc/i586-suse-linux/4.1.0/cc1 -fpreprocessed disasm.i -quiet -dumpbase
disasm.c -march=i586 -mtune=i686 -auxbase-strip disasm.o -O2 -Wall -Wall
-pedantic -std=c99 -version -fmessage-length=0 -fno-strict-aliasing -o disasm.s
disasm.c: In function ‘disasm’:
disasm.c:579: internal compiler error: Segmentation fault 
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.suse.de/feedback> for instructions.

#0  0x082c9862 in operand_equal_p (arg0=0x40437c98, arg1=0x404441a0, flags=0)
    at fold-const.c:2413
#1  0x0817ab10 in simplify_replace_tree (expr=0x40437c98, old=0x404441a0,
    new=0x4031ce28) at tree-ssa-loop-niter.c:605
#2  0x0817ac46 in simplify_replace_tree (expr=0x4050ecf0, old=0x404441a0,
    new=0x4031ce28) at tree-ssa-loop-niter.c:616
#3  0x0817ac46 in simplify_replace_tree (expr=0x4050f2c0, old=0x404441a0,
    new=0x4031ce28) at tree-ssa-loop-niter.c:616
#4  0x081803f2 in substitute_in_loop_info (loop=0x89e6548, name=0x404441a0,
    val=0x4031ce28) at tree-ssa-loop-niter.c:2053
#5  0x080e5e0e in replace_uses_by (name=0x404441a0, val=0x4031ce28)
    at tree-cfg.c:1293
#6  0x080e66e5 in tree_merge_blocks (a=0x40480820, b=0x404ce870)
    at tree-cfg.c:1341
#7  0x08524467 in merge_blocks (a=0x40480820, b=0x404ce870) at cfghooks.c:530
#8  0x081f39de in merge_seq_blocks () at cfgcleanup.c:2064
#9  0x0854a62a in cleanup_tree_cfg_1 () at tree-cfgcleanup.c:520
#10 0x0854a660 in cleanup_tree_cfg () at tree-cfgcleanup.c:541
#11 0x0854a6b6 in cleanup_tree_cfg_loop () at tree-cfgcleanup.c:564
#12 0x08198cee in tree_unroll_loops_completely (loops=0x885b9e8,
    may_increase_size=0 '\0') at tree-ssa-loop-ivcanon.c:391
#13 0x081797f9 in tree_complete_unroll () at tree-ssa-loop.c:376
#14 0x0852f0cd in execute_one_pass (pass=0x87752c0) at passes.c:827

  /* If both types don't have the same signedness, then we can't consider
     them equal.  We must check this before the STRIP_NOPS calls
     because they may change the signedness of the arguments.  */
  if (TYPE_UNSIGNED (TREE_TYPE (arg0)) != TYPE_UNSIGNED (TREE_TYPE (arg1)))
    return 0;

(gdb) call debug_tree(arg0)
 <ssa_name 0x40437c98 nothrow var <var_decl 0x403325d8 D.3500> def_stmt
<ssa_name 0x40437b94>
    version 246 in-free-list>
(gdb) call debug_tree(arg1)
 <ssa_name 0x404441a0
    type <integer_type 0x4019d2e0 unsigned int sizes-gimplified public unsigned
SI
        size <integer_cst 0x4018d408 constant invariant 32>
        unit size <integer_cst 0x4018d198 constant invariant 4>
        align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0x4018d480
0> max <integer_cst 0x4018d468 4294967295>>
    var <var_decl 0x40508688 ivtmp.485> def_stmt <phi_node 0x403e7b00>
    version 1050>

we have a DEF_STMT in arg0.  Ugh.


-- 
           Summary: [4.1 Regression] ICE: Segmentation fault in
                    operand_equal_p (complete loop unrolling)
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
@ 2005-10-06  8:40 ` rguenth at gcc dot gnu dot org
  2005-10-06 11:28 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-06  8:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2005-10-06 08:40 -------
Created an attachment (id=9901)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9901&action=view)
testcase

Preprocessed testcase.


-- 


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
  2005-10-06  8:40 ` [Bug tree-optimization/24226] " rguenth at gcc dot gnu dot org
@ 2005-10-06 11:28 ` rguenth at gcc dot gnu dot org
  2005-10-06 11:43 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-06 11:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2005-10-06 11:28 -------
Reducing.


-- 


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
  2005-10-06  8:40 ` [Bug tree-optimization/24226] " rguenth at gcc dot gnu dot org
  2005-10-06 11:28 ` rguenth at gcc dot gnu dot org
@ 2005-10-06 11:43 ` rguenth at gcc dot gnu dot org
  2005-10-06 11:43 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-06 11:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2005-10-06 11:43 -------
Created an attachment (id=9910)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9910&action=view)
reduced testcase

Reduced testcase.


-- 


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-10-06 11:43 ` rguenth at gcc dot gnu dot org
@ 2005-10-06 11:43 ` rguenth at gcc dot gnu dot org
  2005-10-06 13:41 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-06 11:43 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-06 11:43:16
               date|                            |


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-10-06 11:43 ` rguenth at gcc dot gnu dot org
@ 2005-10-06 13:41 ` pinskia at gcc dot gnu dot org
  2005-10-06 15:19 ` belyshev at depni dot sinp dot msu dot ru
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-06 13:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2005-10-06 13:40 -------
Confirmed, reduced testcase:
typedef struct {
  int basereg, indexreg, scale;
  long segment;
  long offset;
} operand;
typedef struct extop {
  operand oprs[3];
} insn;
enum { I_CMOVcc,  I_Jcc,  I_SETcc };
struct itemplate {
  int opcode;
  int operands;
  long opd[3];
  const char *code;
};
static int ico[] = {
  I_CMOVcc,  I_Jcc,  I_SETcc
};
static int matches(struct itemplate *t, unsigned char *data, int asize,
                   int osize, int segsize, int rep, insn * ins)
{
  unsigned char *r = (unsigned char *)(t->code);
  unsigned char *origdata = data;
  while (*r) {
    int c = *r++;
    if (c >= 01 && c <= 03) {
      switch (*data++) {
        case 0x1F:
          return 0;
      }
    }
    if (c == 05) {
      switch (*data++) {
        case 0x06:
          ins->oprs[0].basereg = 1;
      }
    }
    if (c == 07) 
      data++;
    if (c >= 010 && c <= 012) 
      data++;
    if (c == 017)    
      data++;
    if (c >= 014 && c <= 016) 
      data++;
    if (c >= 020 && c <= 022) 
      data++;
    if (c >= 024 && c <= 026)
      data++;
    if (c >= 030 && c <= 032) 
      data++;
    if (c >= 034 && c <= 036) 
      data++;
    if (c >= 040 && c <= 042) 
      data++;
    if (c >= 044 && c <= 046) 
      data++;
    if (c >= 050 && c <= 052) 
      data++;
    if (c >= 060 && c <= 062) 
      data++;
    if (c >= 064 && c <= 066) 
      data++;
    if (c >= 070 && c <= 072) 
      data++;
    if (c >= 0100 && c < 0130) 
      data++;
    if (c >= 0130 && c <= 0132) 
      data++;
    if (c >= 0140 && c <= 0142) 
      data++;
    if (c >= 0200 && c <= 0277) 
      data++;
  }
  return data - origdata;
}
void disasm(unsigned char *data, char *output, int outbufsize, int segsize,
            long offset, int autosync, unsigned long prefer)
{
  struct itemplate **p, **best_p;
  int length, best_length = 0;
  int rep, lock, asize, osize, i, slen, colon;
  insn tmp_ins, ins;
  for (; *p; p++)
    if ((length = matches(*p, data, asize, osize, segsize, rep, &tmp_ins)))
      for (i = 0; i < (*p)->operands; i++)
        if (tmp_ins.oprs[i].segment & 4)
          break;
  for (i = 0; i < ( sizeof(ico) / sizeof(*(ico)) ); i++)
    if ((*p)->opcode == ico[i])
             break;
}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-10-06 13:41 ` pinskia at gcc dot gnu dot org
@ 2005-10-06 15:19 ` belyshev at depni dot sinp dot msu dot ru
  2005-10-06 22:27 ` janis187 at us dot ibm dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-10-06 15:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from belyshev at depni dot sinp dot msu dot ru  2005-10-06 15:19 -------
// a bit smaller test, compile with -O1:

typedef struct
{
  int b, s;
} op;

int *ico [3];

static int bar (char *d) 
{
  long o = d;
  switch (*d) 
    {
    case 0x1F : return 0 ;
    }
  return d - o;
}

void f (long d, int *p, op ops [3], int i)
{
  if (bar (d))
    for (; i < *p; i ++)
      if (ops [i].s && ops [i].b)
        break;
  for (i = 0 ; i < 3; i ++)
    if (p == ico [i])
      break;
}


-- 


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-10-06 15:19 ` belyshev at depni dot sinp dot msu dot ru
@ 2005-10-06 22:27 ` janis187 at us dot ibm dot com
  2005-10-09  9:04 ` rakdver at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: janis187 at us dot ibm dot com @ 2005-10-06 22:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from janis187 at us dot ibm dot com  2005-10-06 22:27 -------
A regression hunt on powerpc-linux using the testcase from comment #5
identified this patch from rakdver@gcc.gnu.org:

  http://gcc.gnu.org/ml/gcc-cvs/2005-06/msg00210.html


-- 

janis187 at us dot ibm dot com changed:

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


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-10-06 22:27 ` janis187 at us dot ibm dot com
@ 2005-10-09  9:04 ` rakdver at gcc dot gnu dot org
  2005-10-09 19:38 ` rakdver at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2005-10-09  9:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rakdver at gcc dot gnu dot org  2005-10-09 09:03 -------
Testing a patch.


-- 

rakdver at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rakdver at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-10-09  9:04 ` rakdver at gcc dot gnu dot org
@ 2005-10-09 19:38 ` rakdver at gcc dot gnu dot org
  2005-10-09 22:50 ` cvs-commit at gcc dot gnu dot org
  2005-10-10  4:35 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2005-10-09 19:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rakdver at gcc dot gnu dot org  2005-10-09 19:38 -------
Patch:

http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00478.html


-- 

rakdver at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-10-09 19:38 ` rakdver at gcc dot gnu dot org
@ 2005-10-09 22:50 ` cvs-commit at gcc dot gnu dot org
  2005-10-10  4:35 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-09 22:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from cvs-commit at gcc dot gnu dot org  2005-10-09 22:50 -------
Subject: Bug 24226

CVSROOT:        /cvs/gcc
Module name:    gcc
Changes by:     rakdver@gcc.gnu.org     2005-10-09 22:50:01

Modified files:
        gcc            : ChangeLog tree-cfg.c tree-flow.h 
                         tree-ssa-loop-niter.c 

Log message:
        PR tree-optimization/24226
        * tree-cfg.c (remove_bb): Clean up unreachable loops.
        * tree-flow.h (free_numbers_of_iterations_estimates_loop): Declare.
        * tree-ssa-loop-niter.c (free_numbers_of_iterations_estimates_loop):
        Export.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10127&r2=2.10128
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcc&r1=2.222&r2=2.223
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow.h.diff?cvsroot=gcc&r1=2.137&r2=2.138
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-niter.c.diff?cvsroot=gcc&r1=2.45&r2=2.46


-- 


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


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

* [Bug tree-optimization/24226] [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling)
  2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2005-10-09 22:50 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-10  4:35 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10  4:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2005-10-10 04:35 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2005-10-10  4:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-06  8:39 [Bug tree-optimization/24226] New: [4.1 Regression] ICE: Segmentation fault in operand_equal_p (complete loop unrolling) rguenth at gcc dot gnu dot org
2005-10-06  8:40 ` [Bug tree-optimization/24226] " rguenth at gcc dot gnu dot org
2005-10-06 11:28 ` rguenth at gcc dot gnu dot org
2005-10-06 11:43 ` rguenth at gcc dot gnu dot org
2005-10-06 11:43 ` rguenth at gcc dot gnu dot org
2005-10-06 13:41 ` pinskia at gcc dot gnu dot org
2005-10-06 15:19 ` belyshev at depni dot sinp dot msu dot ru
2005-10-06 22:27 ` janis187 at us dot ibm dot com
2005-10-09  9:04 ` rakdver at gcc dot gnu dot org
2005-10-09 19:38 ` rakdver at gcc dot gnu dot org
2005-10-09 22:50 ` cvs-commit at gcc dot gnu dot org
2005-10-10  4:35 ` pinskia at gcc dot gnu dot 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).