optimization/6810: GCC 3.1 win32 generates incorrect code if -O2 -fomit-frame-pointer are specified WORKAROUND

Mathias Schroeder sl41n3@gmx.de
Wed Jun 26 23:06:00 GMT 2002

For release builds one can use the following workaround options:

-fomit-frame-pointer -no-stack-arg-probe -Xlinker --stack=100000,100000

This disables the generation __alloca calls which interfere
with -fomit-frame-pointer. Be sure to include the linker args because
without __alloca the stack must completely exist in physical (comitted)
memory (second argument to --stack). You also get an extra speed benefit at
the expense of the stack memory due to the stack memory not needing to be
paged in via __alloca. If your application unexpectedly exits you may need
increase comitted stack size.


More information about the Gcc-bugs mailing list