Patchwork PATCH COMMITTED: Fix -fsplit-stack bug

login
register
mail settings
Submitter Ian Taylor
Date Sept. 28, 2010, 6:23 p.m.
Message ID <mcrtyl9sp5x.fsf@google.com>
Download mbox | patch
Permalink /patch/66011/
State New
Headers show

Comments

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
mainline.

Ian


2010-09-28  Ian Lance Taylor  <iant@google.com>

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

Patch

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))
 	{