public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix PR80880
Date: Wed, 31 May 2017 12:25:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.20.1705311408070.20726@zhemvz.fhfr.qr> (raw)


Approved by Ilya in the PR.

Bootstrapped / tested on x86_64-unknown-linux-gnu, applied.

Richard.

2017-05-31  Richard Biener  <rguenther@suse.de>

	PR target/80880
	* config/i386/i386.c (ix86_expand_builtin): Remove assert
	for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.

	* gcc.target/i386/pr80880.c: New testcase.

Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	(revision 248722)
+++ gcc/config/i386/i386.c	(working copy)
@@ -37584,7 +37584,6 @@ ix86_expand_builtin (tree exp, rtx targe
 
     case IX86_BUILTIN_BNDRET:
       arg0 = CALL_EXPR_ARG (exp, 0);
-      gcc_assert (TREE_CODE (arg0) == SSA_NAME);
       target = chkp_get_rtl_bounds (arg0);
 
       /* If no bounds were specified for returned value,
Index: gcc/testsuite/gcc.target/i386/pr80880.c
===================================================================
--- gcc/testsuite/gcc.target/i386/pr80880.c	(revision 0)
+++ gcc/testsuite/gcc.target/i386/pr80880.c	(working copy)
@@ -0,0 +1,10 @@
+/* PR target/65523 */
+/* { dg-do compile { target { ! x32 } } } */
+/* { dg-options "-O -fcheck-pointer-bounds -mmpx" } */
+
+int *fn1()
+{
+  int *r = fn1();
+  if (r == (void *)0)
+    return r;
+}

                 reply	other threads:[~2017-05-31 12:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.LSU.2.20.1705311408070.20726@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@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).