https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100817
--- Comment #5 from Richard Biener ---
int a;
int bar();
void __attribute__((cold)) b ()
{
#define FOO \
for (; a;) \
for (; a >= 0;)
#define FOO1 FOO FOO FOO FOO FOO FOO FOO FOO FOO FOO
#define FOO2 FOO1 FOO1 FOO1 FOO1 FOO1 FOO1 FOO1 FOO1 FOO1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100817
--- Comment #4 from Richard Biener ---
Created attachment 50897
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50897=edit
patch
(In reply to Richard Biener from comment #3)
> The number of iterations grows linear with loop depth,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100817
--- Comment #3 from Richard Biener ---
The number of iterations grows linear with loop depth, starting with 6 for
for (; a;)
for (; a >= 0;)
for (; a;)
for (; a; a += 2)
;
adding 2 for every
for (; a;)
for (; a >= 0;)
added.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100817
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100817
--- Comment #1 from Andrew Pinski ---
/* Theoretically possible, but *highly* unlikely. */
gcc_checking_assert (num_iterations < 500);