re PR target/80880 (internal compiler error: in ix86_expand_builtin)
authorRichard Biener <rguenther@suse.de>
Wed, 31 May 2017 12:09:51 +0000 (12:09 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 31 May 2017 12:09:51 +0000 (12:09 +0000)
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.

From-SVN: r248731

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr80880.c [new file with mode: 0644]

index c6266526f48bfeac15dd64306f6f8759a1b6dcdc..6d5d0f6bfdc1e3bf6967a86b07c8f0c4ab5af55f 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
 
        * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
index 6413aa3685d66779dd219c6601c8ef48c808b698..097d143a8a19a5696e309cbc659c038f399184b7 100644 (file)
@@ -37584,7 +37584,6 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
 
     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 cbad5692d3832bd99aabb628eaafb62555fd8aa6..8b74dc3364a211c0d39739efaa1f17a9b526d8ed 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-31  Richard Biener  <rguenther@suse.de>
+
+       PR target/80880
+       * gcc.target/i386/pr80880.c: New testcase.
+
 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
 
        * gcc.dg/vect/vect-103.c: Update wording of dump message.
diff --git a/gcc/testsuite/gcc.target/i386/pr80880.c b/gcc/testsuite/gcc.target/i386/pr80880.c
new file mode 100644 (file)
index 0000000..674a587
--- /dev/null
@@ -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;
+}