From patchwork Tue Sep 28 18:23:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 66011 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id F1558B7101 for ; Wed, 29 Sep 2010 04:23:41 +1000 (EST) Received: (qmail 8189 invoked by alias); 28 Sep 2010 18:23:40 -0000 Received: (qmail 8179 invoked by uid 22791); 28 Sep 2010 18:23:39 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Sep 2010 18:23:33 +0000 Received: from hpaq2.eem.corp.google.com (hpaq2.eem.corp.google.com [172.25.149.2]) by smtp-out.google.com with ESMTP id o8SINUnG029183 for ; Tue, 28 Sep 2010 11:23:31 -0700 Received: from pwj6 (pwj6.prod.google.com [10.241.219.70]) by hpaq2.eem.corp.google.com with ESMTP id o8SIN9Wh010139 for ; Tue, 28 Sep 2010 11:23:29 -0700 Received: by pwj6 with SMTP id 6so4131844pwj.0 for ; Tue, 28 Sep 2010 11:23:28 -0700 (PDT) Received: by 10.114.195.12 with SMTP id s12mr519524waf.14.1285698208586; Tue, 28 Sep 2010 11:23:28 -0700 (PDT) Received: from coign.google.com (dhcp-172-22-123-203.mtv.corp.google.com [172.22.123.203]) by mx.google.com with ESMTPS id r37sm12966527wak.23.2010.09.28.11.23.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 28 Sep 2010 11:23:27 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org Subject: PATCH COMMITTED: Fix -fsplit-stack bug Date: Tue, 28 Sep 2010 11:23:22 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 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)) {