[Bug middle-end/59538] Optimization of -O2 or higher creates incorrect code in loop

2013-12-17 Thread arsham at skrenes dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59538 --- Comment #6 from Arsham Skrenes --- (In reply to Dominique d'Humieres from comment #5) > > Also, is there a directive that I can use to explicitly tell GCC > > to not remove a loop (without having to resort to a compiler flag > > which is glo

[Bug middle-end/59538] Optimization of -O2 or higher creates incorrect code in loop

2013-12-17 Thread arsham at skrenes dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59538 Arsham Skrenes changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID

[Bug middle-end/59538] Optimization of -O2 or higher creates incorrect code in loop

2013-12-17 Thread arsham at skrenes dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59538 --- Comment #4 from Arsham Skrenes --- Can I suggest then that GCC outputs a compiler warning when it removes a loop? It outputs warnings for unused variables as well as implicit casting, so why not have a warning for removing loops? Also, is the

[Bug c/59538] New: Optimization of -O2 or higher creates incorrect code in loop

2013-12-17 Thread arsham at skrenes dot com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: arsham at skrenes dot com Created attachment 31462 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31462&action=edit Small prime number calculating program that shows bug I'm