Subject: bug#18995: Error: Could not reserve dynamic heap area.

From: Eli Zaretskii <[email-masked]>
Date: Sat, 08 Nov 2014 21:50:13 +0200

> Date: Sat, 8 Nov 2014 20:16:19 +0100
> From: Alexander Shukaev <[email-masked]>
> Cc: [email-masked]
> 
>     So what, the optimized code goes only once through the loop, and then
>     bails out? If so, what is the value of 'size' when the loop ends?
>     
> 
> OK, so there was one more detail that I forgot to mention. It looks like I also
> had "-funroll-loops". After removing it, "-O3" works fine too (without
> "volatile"). I think this is still a toolchain bug because "-O3 -funroll-loops"
> combination works fine in the x64 build and what's more important --- it
> *should* work fine. Anyway, maybe it's a good idea to somehow prevent people
> from passing "-funroll-loops" by filtering it out from "CFLAGS" in "Makefile"
> for example?

Do you understand why -funroll-loops causes the code to fail to work?
Because I cannot.  Unless I'm missing something, this sounds like a
GCC bug.