* [Bug tree-optimization/56426] [4.8 Regression] Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358
2013-02-22 14:52 [Bug tree-optimization/56426] New: Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358 antoine.balestrat at gmail dot com
@ 2013-02-22 15:50 ` mpolacek at gcc dot gnu.org
2013-02-25 8:45 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-02-22 15:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56426
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-02-22
CC| |mpolacek at gcc dot gnu.org
Target Milestone|--- |4.8.0
Summary|Segmentation fault in |[4.8 Regression]
|find_var_scev_info, at |Segmentation fault in
|tree-scalar-evolution.c:358 |find_var_scev_info, at
| |tree-scalar-evolution.c:358
Ever Confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-02-22 15:49:02 UTC ---
Confirmed. Started with
http://gcc.gnu.org/viewcvs?view=revision&revision=195879
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/56426] [4.8 Regression] Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358
2013-02-22 14:52 [Bug tree-optimization/56426] New: Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358 antoine.balestrat at gmail dot com
2013-02-22 15:50 ` [Bug tree-optimization/56426] [4.8 Regression] " mpolacek at gcc dot gnu.org
@ 2013-02-25 8:45 ` rguenth at gcc dot gnu.org
2013-02-25 10:58 ` mpolacek at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-25 8:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56426
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-25 08:45:36 UTC ---
Mine.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/56426] [4.8 Regression] Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358
2013-02-22 14:52 [Bug tree-optimization/56426] New: Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358 antoine.balestrat at gmail dot com
2013-02-22 15:50 ` [Bug tree-optimization/56426] [4.8 Regression] " mpolacek at gcc dot gnu.org
2013-02-25 8:45 ` rguenth at gcc dot gnu.org
@ 2013-02-25 10:58 ` mpolacek at gcc dot gnu.org
2013-02-25 12:15 ` mpolacek at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-02-25 10:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56426
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-02-25 10:58:12 UTC ---
(gdb)
358 slot = htab_find_slot (scalar_evolution_info, &tmp, INSERT);
(gdb) p scalar_evolution_info
$1 = (htab_t) 0x0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/56426] [4.8 Regression] Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358
2013-02-22 14:52 [Bug tree-optimization/56426] New: Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358 antoine.balestrat at gmail dot com
` (2 preceding siblings ...)
2013-02-25 10:58 ` mpolacek at gcc dot gnu.org
@ 2013-02-25 12:15 ` mpolacek at gcc dot gnu.org
2013-02-25 12:50 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-02-25 12:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56426
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-02-25 12:15:05 UTC ---
Goes away with -fno-tree-pre. The thing is, PRE calls scev_finalize. But
before loop optimizing, especially estimate_numbers_of_iterations, which calls
estimate_numbers_of_iterations_loop, SCEV should be initialized. Or at least
estimate_numbers_of_iterations_loop should be guarded by if (scev_initialized_p
()) as on other places. SCEV is normally initialized in tree_ssa_loop_init,
but only if number_of_loops > 1.
if (number_of_loops () <= 1)
return 0;
scev_initialize ();
Would it make sense to always initialize SCEV, i.e.:
--- gcc/tree-ssa-loop.c.mp 2013-02-25 13:06:47.212132327 +0100
+++ gcc/tree-ssa-loop.c 2013-02-25 13:06:50.148141586 +0100
@@ -70,10 +70,11 @@ tree_ssa_loop_init (void)
| LOOPS_HAVE_RECORDED_EXITS);
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
+ scev_initialize ();
+
if (number_of_loops () <= 1)
return 0;
- scev_initialize ();
return 0;
}
?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/56426] [4.8 Regression] Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358
2013-02-22 14:52 [Bug tree-optimization/56426] New: Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358 antoine.balestrat at gmail dot com
` (3 preceding siblings ...)
2013-02-25 12:15 ` mpolacek at gcc dot gnu.org
@ 2013-02-25 12:50 ` rguenth at gcc dot gnu.org
2013-02-25 14:07 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-25 12:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56426
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-25 12:50:15 UTC ---
Lack of predicated value-numbering makes the IL such that copy-propagation
inside the loop pipeline makes the single loop reducible. Thus we missed
scev_initialize.
[gives light to the fact that our concept of 'loop pipeline' is somewhat
ill-defined]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/56426] [4.8 Regression] Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358
2013-02-22 14:52 [Bug tree-optimization/56426] New: Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358 antoine.balestrat at gmail dot com
` (4 preceding siblings ...)
2013-02-25 12:50 ` rguenth at gcc dot gnu.org
@ 2013-02-25 14:07 ` mpolacek at gcc dot gnu.org
2013-02-26 11:07 ` mpolacek at gcc dot gnu.org
2013-02-26 11:08 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-02-25 14:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56426
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|rguenth at gcc dot gnu.org |mpolacek at gcc dot gnu.org
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-02-25 14:06:29 UTC ---
Reassigning.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/56426] [4.8 Regression] Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358
2013-02-22 14:52 [Bug tree-optimization/56426] New: Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358 antoine.balestrat at gmail dot com
` (5 preceding siblings ...)
2013-02-25 14:07 ` mpolacek at gcc dot gnu.org
@ 2013-02-26 11:07 ` mpolacek at gcc dot gnu.org
2013-02-26 11:08 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-02-26 11:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56426
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-02-26 11:06:28 UTC ---
Author: mpolacek
Date: Tue Feb 26 11:06:14 2013
New Revision: 196281
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196281
Log:
2013-02-26 Marek Polacek <polacek@redhat.com>
PR tree-optimization/56426
* tree-ssa-loop.c (tree_ssa_loop_init): Always call
scev_initialize.
Added:
trunk/gcc/testsuite/gcc.dg/pr56436.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-loop.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/56426] [4.8 Regression] Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358
2013-02-22 14:52 [Bug tree-optimization/56426] New: Segmentation fault in find_var_scev_info, at tree-scalar-evolution.c:358 antoine.balestrat at gmail dot com
` (6 preceding siblings ...)
2013-02-26 11:07 ` mpolacek at gcc dot gnu.org
@ 2013-02-26 11:08 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-02-26 11:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56426
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-02-26 11:07:42 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread