public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-67265-4-4G1KI2hdxr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-67265-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67265

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
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.


  parent reply	other threads:[~2015-10-28 17:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19  0:32 [Bug c/67265] New: " gnu at JonnyJD dot net
2015-08-19  0:45 ` [Bug target/67265] " pinskia at gcc dot gnu.org
2015-08-19  2:08 ` danielmicay at gmail dot com
2015-10-28 17:11 ` ebotcazou at gcc dot gnu.org
2015-10-28 17:37 ` ebotcazou at gcc dot gnu.org [this message]
2015-10-28 17:40 ` ebotcazou at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-67265-4-4G1KI2hdxr@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).