From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14530 invoked by alias); 28 Jan 2015 22:07:49 -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 14275 invoked by uid 48); 28 Jan 2015 22:07:40 -0000 From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug jit/64810] jit not working on armv7hl ("ld: error: /tmp/libgccjit-ZGemdr/fake.so uses VFP register arguments, /tmp/ccJFCBsE.o does not") Date: Wed, 28 Jan 2015 22:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: jit X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org 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-01/txt/msg03324.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64810 --- Comment #15 from David Malcolm --- (In reply to David Malcolm from comment #13) > Am investigating. What appears to be happening is the 1st time through arm_option_override, arm_selected_cpu is NULL, but is set to non-NULL at: arm_selected_cpu = arm_selected_arch; The 2nd time through, arm_selected_cpu hasn't been reset, and so the condition: if (arm_selected_arch) { if (arm_selected_cpu) { /* Check for conflict between mcpu and march. */ fires, and this clause fires: /* -mcpu wins. */ arm_selected_arch = NULL; so we have a NULL arm_selected_arch and a non-NULL arm_selected_cpu. Fix appears to be to simply set each of these to NULL at the top of arm_option_override, to prevent state from previous in-process runs from affecting things: --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2627,6 +2627,10 @@ arm_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, static void arm_option_override (void) { + arm_selected_arch = NULL; + arm_selected_cpu = NULL; + arm_selected_tune = NULL; + if (global_options_set.x_arm_arch_option) arm_selected_arch = &all_architectures[arm_arch_option]; With this, and the previous patch, most of the jit testsuite passes. I still see another failure in: FAIL: test-expressions.c.exe killed: 12479 exp8 0 0 CHILDKILLED SIGSEGV {segmentation violation} which appears to be (yet) another issue.