This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/22438] New: [4.1 Regression] ICE SEGV in is_gimple_variable at tree-gimple.c:239


This patch:

2005-07-06  Zdenek Dvorak  <dvorakz@suse.cz>

	PR tree-optimization/21963
	* tree-ssa-loop-ivopts.c (get_computation_aff): Use
	constant_multiple_of in the same way get_computation_cost_at does.

introduces similar (to one described in PR 21963) segfault in is_gimple_variable,
here is C testcase, compile with -O:
------------------------------------------------------------------------------
int bar (char i, int c)
{
  int j = 0, k = 0;
  
  while (1)
    {
      j += i;
      if (!c)
	{
	  if (k)
	    break;
	}
      else
	k = 1;
    }
  return j;
}
------------------------------------------------------------------------------
backtrace:
Starting program: /home/ssb/src/build/gcc/cc1 -quiet
/home/ssb/src/bugs/pending/multi.i -O1

Program received signal SIGSEGV, Segmentation fault.
0x00000000004dfdc0 in is_gimple_variable (t=0x0)
    at ../../gcc41/gcc/tree-gimple.c:239
239	  return (TREE_CODE (t) == VAR_DECL
(gdb) bt
#0  0x00000000004dfdc0 in is_gimple_variable (t=0x0)
    at ../../gcc41/gcc/tree-gimple.c:239
#1  0x00000000004e0300 in is_gimple_val (t=0x0)
    at ../../gcc41/gcc/tree-gimple.c:366
#2  0x00000000004fc9f7 in force_gimple_operand (expr=0x0, 
    stmts=0x7fffff8e4ca8, simple=0 '\0', var=0x2aaaab14f8f0)
    at ../../gcc41/gcc/gimplify.c:4845
#3  0x00000000005a1184 in rewrite_use_nonlinear_expr (data=0x7fffff8e4e70, 
    use=0xede9a0, cand=0xedf480) at ../../gcc41/gcc/tree-ssa-loop-ivopts.c:5365
#4  0x00000000005a2dba in rewrite_use (data=0x7fffff8e4e70, use=0xede9a0, 
    cand=0xedf480) at ../../gcc41/gcc/tree-ssa-loop-ivopts.c:5729
#5  0x00000000005a2e75 in rewrite_uses (data=0x7fffff8e4e70)
    at ../../gcc41/gcc/tree-ssa-loop-ivopts.c:5765
#6  0x00000000005a3833 in tree_ssa_iv_optimize_loop (data=0x7fffff8e4e70, 
    loop=0xed0290) at ../../gcc41/gcc/tree-ssa-loop-ivopts.c:5941
#7  0x00000000005a38d8 in tree_ssa_iv_optimize (loops=0xede9f0)
    at ../../gcc41/gcc/tree-ssa-loop-ivopts.c:5978
#8  0x000000000055fc6d in tree_ssa_loop_ivopts ()
    at ../../gcc41/gcc/tree-ssa-loop.c:416
#9  0x00000000009b94fc in execute_one_pass (pass=0xdeaf80)
    at ../../gcc41/gcc/passes.c:774

-- 
           Summary: [4.1 Regression] ICE SEGV in is_gimple_variable at tree-
                    gimple.c:239
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at depni dot sinp dot msu dot ru
                CC: gcc-bugs at gcc dot gnu dot org,rakdver at gcc dot gnu
                    dot org
GCC target triplet: x86_64-*-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]