From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18027 invoked by alias); 14 Jul 2015 20:31:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17977 invoked by uid 48); 14 Jul 2015 20:31:15 -0000 From: "boger at us dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/66870] split stack issues on ppc64le and ppc64 Date: Tue, 14 Jul 2015 20:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: boger at us dot ibm.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg01154.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66870 --- Comment #5 from boger at us dot ibm.com --- (In reply to Andreas Schwab from comment #4) > > past a few statements > > Huh?? Here is your patch diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c index ce4dd9b..d952e0f 100644 --- a/gcc/go/go-lang.c +++ b/gcc/go/go-lang.c @@ -158,10 +158,6 @@ go_langhook_init_options_struct (struct gcc_options *opts) opts->x_flag_errno_math = 0; opts->frontend_set_flag_errno_math = true; - /* We turn on stack splitting if we can. */ - if (targetm_common.supports_split_stack (false, opts)) - opts->x_flag_split_stack = 1; - /* Exceptions are used to handle recovering from panics. */ opts->x_flag_exceptions = 1; opts->x_flag_non_call_exceptions = 1; @@ -295,6 +291,11 @@ go_langhook_post_options (const char **pfilename ATTRIBUTE_UNUSED) && global_options.x_write_symbols == NO_DEBUG) global_options.x_write_symbols = PREFERRED_DEBUGGING_TYPE; + /* We turn on stack splitting if we can. */ + if (!global_options_set.x_flag_split_stack + && targetm_common.supports_split_stack (false, &global_options)) + global_options.x_flag_split_stack = 1; + /* Returning false means that the backend should be used. */ return false; } Your change moved the if statement containing the call to targetm_common.supports_split_stack to a different location in the file (past a few statements) and re-added them along with a check for global_options_set.x_flag_split_stack. It looks to me that the values in the rs6000_isa_flags are still the same whether you call supports_split_stack where it was or where you moved it to. I'm trying to fix some of the other issues mentioned in this bugzilla and even with your fix I sometimes hit the original problem when building with m32.