[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-09 Thread hubicka at gcc dot gnu dot org


--- Comment #6 from hubicka at gcc dot gnu dot org  2008-09-09 12:23 ---
This also breaks because of gimple_regimplify_operands

Breakpoint 3, gimple_regimplify_operands (stmt=0x2af5b100,
gsi_p=0x7fffe3b0) at ../../gcc/gimplify.c:7374
7374  push_gimplify_context (gctx);
(gdb) p debug_gimple_stmt (stmt)
__comp_ctor  (this_1(D)-time_);

shortly after processing this we die.  I am investigating.

Honza


-- 

hubicka at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rguenther at suse dot de,
   ||jakub at redhat dot com


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-09 Thread hubicka at gcc dot gnu dot org


--- Comment #7 from hubicka at gcc dot gnu dot org  2008-09-09 12:37 ---
Jakub,
disabling the regimplification introduced here
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00500.html
fixes the testcase.  Since you invented the regimplify function, could you take
a look, please?


-- 


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-09 Thread hubicka at gcc dot gnu dot org


--- Comment #8 from hubicka at gcc dot gnu dot org  2008-09-09 12:47 ---
Created an attachment (id=16263)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16263action=view)
patch in testing

OK,
I think the problem is that regimplify expect the statement to be already
inserted.


-- 


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-09 Thread jakub at gcc dot gnu dot org


--- Comment #9 from jakub at gcc dot gnu dot org  2008-09-09 13:03 ---
Yes, it does (after all, it sometimes needs to insert statements even after
stmt).  Your patch is IMHO correct, but incomplete.  There are 2 things that
also need doing:
1) I think in while (!gsi_end_p (copy_gsi)) loop we want to iterate from the
   first stmt inserted from remaping orig_stmt, whether it is created by
   force_gimple_operand_gsi or gimple_regimplify_operands.  ATM we just
   handle the last one.  I guess we want 2 gimple_stmt_iterator's, one will
keep
   advancing to the last stmt and one will be copy_gsi value when
   gimple_duplicate_stmt_histograms was called.
2) insert_init_stmt also calls gimple_regimplify_operands.  It shouldn't create
   new gimplify_context, as gimple_regimplify_operands does that, and I'm not
   sure it needs to call find_new_referenced_vars (gimple_regimplify_operands
   calls mark_symbols_for_renaming and add_referenced_var on the temps). 
   Certainly init_stmt needs to be inserted into the sequence before calling
   gimple_regimplify_operands though.


-- 


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-09 Thread rguenth at gcc dot gnu dot org


--- Comment #10 from rguenth at gcc dot gnu dot org  2008-09-09 13:07 
---
PR37432 is also related, where regimplify operands fails to notice that
a non-register lhs requires a temporary.


-- 


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-09 Thread jakub at gcc dot gnu dot org


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-09-04 01:17:53 |2008-09-09 17:14:41
   date||


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-09 Thread jsm28 at gcc dot gnu dot org


-- 

jsm28 at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P1


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-09 Thread jakub at gcc dot gnu dot org


--- Comment #11 from jakub at gcc dot gnu dot org  2008-09-09 22:07 ---
Subject: Bug 37356

Author: jakub
Date: Tue Sep  9 22:06:20 2008
New Revision: 140177

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=140177
Log:
PR middle-end/37356
* tree-inline.c (copy_bb): Insert stmt into copy_basic_block before
calling gimple_regimplify_operands on it.  Iterate over all newly
added statements, not just the last one.
(insert_init_stmt): Insert stmt into seq first, then call
gimple_regimplify_operands on it.  Don't create new gimplification
context, nor find referenced vars.

* g++.dg/tree-ssa/pr37356.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/tree-ssa/pr37356.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-inline.c


-- 


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-09 Thread jakub at gcc dot gnu dot org


--- Comment #12 from jakub at gcc dot gnu dot org  2008-09-09 22:11 ---
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-08 Thread reichelt at gcc dot gnu dot org


--- Comment #5 from reichelt at gcc dot gnu dot org  2008-09-08 23:52 
---
The regression appeared between 2008-07-26 and 2008-07-29?
Fallout of tuples merge?


-- 

reichelt at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||reichelt at gcc dot gnu dot
   ||org


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-03 Thread tbm at cyrius dot com


--- Comment #1 from tbm at cyrius dot com  2008-09-03 17:23 ---
Created an attachment (id=16210)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16210action=view)
Preprocessed code


-- 


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-03 Thread tbm at cyrius dot com


--- Comment #2 from tbm at cyrius dot com  2008-09-03 17:24 ---
Created an attachment (id=16211)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16211action=view)
Slightly reduced testcase


-- 


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-03 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Target Milestone|--- |4.4.0


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-03 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2008-09-03 21:28 ---
This might have been fixed by:
2008-09-03  Richard Guenther  [EMAIL PROTECTED]

PR tree-optimization/37328
* tree-sra.c (sra_build_assignment): Gimplify properly.
(generate_copy_inout): Take the correct stmt as definition,
remove bogus assert.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||ice-on-valid-code


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



[Bug middle-end/37356] [4.4 Regression] ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222

2008-09-03 Thread pinskia at gcc dot gnu dot org


--- Comment #4 from pinskia at gcc dot gnu dot org  2008-09-04 01:17 ---
Nope, this is an inlining issue.  Reduced testcase:
bool f();
int neg_infinity();
bool is_inf(int v)   {
return (v == neg_infinity());
};
struct counted_time_rep   {
  counted_time_rep()
  {
is_inf(1) || f();
  }
};
struct base_time  {
  static counted_time_rep get_time_rep() {
return counted_time_rep();
  }
  base_time(const int day){}
  base_time() :time_(get_time_rep() )   { }
  counted_time_rep time_;
};
base_time a1;
void f1(void)
{
  int d;
  a1 = d;
}


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|normal  |critical
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-09-04 01:17:53
   date||


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