re PR middle-end/67821 (ICE in duplicate_ssa_name_range_info)
authorMarek Polacek <polacek@redhat.com>
Mon, 5 Oct 2015 15:28:06 +0000 (15:28 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 5 Oct 2015 15:28:06 +0000 (15:28 +0000)
PR tree-optimization/67821
* tree-ssanames.c (duplicate_ssa_name_range_info): Remove an assert.

* gcc.dg/torture/pr67821-2.c: New test.
* gcc.dg/torture/pr67821.c: New test.

From-SVN: r228490

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr67821-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr67821.c [new file with mode: 0644]
gcc/tree-ssanames.c

index 5340f47a1beaaf7e76313ea37489b3e23b589fd1..ff76048438affbad78a673def0b9578d33c549ed 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-05  Marek Polacek  <polacek@redhat.com>
+
+       PR tree-optimization/67821
+       * tree-ssanames.c (duplicate_ssa_name_range_info): Remove an assert.
+
 2015-10-05  Thomas Schwinge  <thomas@codesourcery.com>
 
        PR other/65021
index f6f920307b1e51b36cc9494075b72a5d97547d3e..762da2abeba29bb2bdff57db41fdd2b326cc95e5 100644 (file)
@@ -1,3 +1,9 @@
+2015-10-05  Marek Polacek  <polacek@redhat.com>
+
+       PR tree-optimization/67821
+       * gcc.dg/torture/pr67821-2.c: New test.
+       * gcc.dg/torture/pr67821.c: New test.
+
 2015-10-05  Kirill Yukhin  <kirill.yukhin@intel.com>
 
        * gcc.target/i386/builtin_target.c: Add check for "skylake-avx512".
diff --git a/gcc/testsuite/gcc.dg/torture/pr67821-2.c b/gcc/testsuite/gcc.dg/torture/pr67821-2.c
new file mode 100644 (file)
index 0000000..38cfc84
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+int a, b, c, d, e, g;
+short f;
+
+void
+fn1 ()
+{
+  int i;
+  f = a - b;
+  e = (c && (i = d = (unsigned) f - 1)) || i;
+  g = (unsigned) f - 1;
+  c && (d = 0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr67821.c b/gcc/testsuite/gcc.dg/torture/pr67821.c
new file mode 100644 (file)
index 0000000..1c9e8b9
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+int isdigit (int);
+
+int
+foo (const char *s)
+{
+  int success = 1;
+  const char *p = s + 2;
+  if (!isdigit (*p))
+    success = 0;
+  while (isdigit (*p))
+    ++p;
+  return success;
+}
index 64e23790ae3cab278eb69e5838848ca9f66b816a..91f4ed8d7f162719012e9cf29aaa0f36cc31ca4a 100644 (file)
@@ -503,7 +503,6 @@ duplicate_ssa_name_range_info (tree name, enum value_range_type range_type,
 
   gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name)));
   gcc_assert (!SSA_NAME_RANGE_INFO (name));
-  gcc_assert (!SSA_NAME_ANTI_RANGE_P (name));
 
   if (!range_info)
     return;