public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR80880
@ 2017-05-31 12:25 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2017-05-31 12:25 UTC (permalink / raw)
  To: gcc-patches


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;
+}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-31 12:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 12:25 [PATCH] Fix PR80880 Richard Biener

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).