------- Comment #3 from bonzini at gnu dot org  2009-07-15 11:11 -------
do while does not have the same behavior, so the loop "shape" is important. 
the following is as bad and does not have function calls.

#define ONE     while (x-- > y)
#define TEN     ONE ONE ONE ONE ONE ONE ONE ONE ONE ONE
#define HUN     TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN
#define THOU    HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN

void foo(int x, int y)
{
  /* 11,000 nested whiles.  */
  THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU
  y++;
}


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |compile-time-hog


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

Reply via email to