From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77202 invoked by alias); 28 Oct 2015 17:37:24 -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 77144 invoked by uid 48); 28 Oct 2015 17:37:19 -0000 From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/67265] [x86] 'asm' operand has impossible constraints with -fstack-check Date: Wed, 28 Oct 2015 17:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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-10/txt/msg02392.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67265 --- Comment #5 from Eric Botcazou --- For the minimal testcase we can do: Index: ira.c =================================================================== --- ira.c (revision 229402) +++ ira.c (working copy) @@ -2273,7 +2273,9 @@ ira_setup_eliminable_regset (void) || (cfun->calls_alloca && EXIT_IGNORE_STACK) /* We need the frame pointer to catch stack overflow exceptions if the stack pointer is moving. */ - || (flag_stack_check && STACK_CHECK_MOVING_SP) + || (flag_stack_check + && STACK_CHECK_MOVING_SP + && (!crtl->is_leaf || cfun->calls_alloca)) || crtl->accesses_prior_frames || (SUPPORTS_STACK_ALIGNMENT && crtl->stack_realign_needed) /* We need a frame pointer for all Cilk Plus functions that use i.e. do not reserve the frame pointer if the function is leaf and doesn't call alloca, but this might not be sufficient for the original testcase.