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/53128] [4.8 Regression] Compiler produces infinite loop on regular O2


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

--- Comment #7 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2012-05-04 16:15:09 UTC ---
(In reply to comment #6)
> Compiler does not simply see such code, it happens after some analysis, right?
> For example, after work of infer_loop_bounds_from_undefined which makes some
> assumptions and I believe can produce some information for user.

My understanding is that this is non-trivial to do from within the current
passes because "undefined" in that context does not mean "this code is wrong"
but "we don't know what happens here but we can assume what doesn't happen". So
perhaps a new pass looking specifically for infinite loops could be more
effective.

In any case, if you know how to do it, please propose a patch, so people can
discuss it. If there is way to warn for this that doesn't generate an awful
number of false positives, I think such patch would be very welcome.

> Again, I'm worrying about all this from user-perspective and especially after
> discovering 2 such things in spec2006 sources(PR53086 and PR53073).

I think there is no discussion about whether GCC would like to have such a
warning. What is not clear is the best way to do it. So please, test your ideas
and send a prototype of your patch for discussion. People are more likely to
give you feedback when there is something concrete to discuss about.


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