PATCH COMMITTED: Fix -fsplit-stack bug

Message ID
State New
Headers show

Commit Message

Ian Taylor Sept. 28, 2010, 6:23 p.m.
This patch fixes a bug in the generic -fsplit-stack code: I didn't
realize that decode_options can now be called more than once, when
processing the options attribute.  Bootstrapped on
x86_64-unknown-linux-gnu, did a partial testsuite run.  Committed to


2010-09-28  Ian Lance Taylor  <>

	PR target/45815
	* opts.c (decode_options): Don't test whether the target supports
	split stack if flag_split_stack == 0.


Index: opts.c
--- opts.c	(revision 164670)
+++ opts.c	(working copy)
@@ -1091,7 +1091,7 @@  decode_options (unsigned int argc, const
      default value if they choose based on other options.  */
   if (flag_split_stack == -1)
     flag_split_stack = 0;
-  else
+  else if (flag_split_stack)
       if (!targetm.supports_split_stack (true))