[Bug tree-optimization/58697] [4.8/4.9 Regression] wrong code (segfaults) at -O3
amacleod at redhat dot com
gcc-bugzilla@gcc.gnu.org
Tue Oct 15 18:47:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58697
--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> ---
Created attachment 31013
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31013&action=edit
patch to re-introduce the error
OK, I found my error :-P sigh.
estimated_loop_iterations and max_loop_iterations were split into get_ version
for the cfgloop routines.
there are also _int versions of those routines, and
estimated_loop_iterations_int got moved to cfgloop.c. max_loop_iterations_int
did not. when estimated_loop_iterations_int got moved, it also was changed to
call get_estimated_loop_iterations like a good cfgroutine. so when
tree-ssa-unswitch calls it, it doesn't calculate like it should.
In any case, I think I have the mess sorted out now. I've added get_ version
for both _int routines as well. All cfg* routines use 'get_' versions, and all
tree- versions use the non-'get_' version, with the exception of the 2 routines
which actually calculate the values.. they use the get_ version as a fallback
(which is where the factoring came from).
too hard on the head :-)
If I apply this patch, the run time error comes back :-) seems so backwards
somehow :-)
Anyway, I'm running it through regressions and bootstrapping.
More information about the Gcc-bugs
mailing list