]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Jun 2014 15:08:30 +0000 (15:08 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Jun 2014 15:08:30 +0000 (15:08 +0000)
PR bootstrap/61583
* tree-vrp.c (remove_range_assertions): Do not set is_unreachable
to zero on debug statements.
gcc/testsuite/
* gcc.dg/pr61583.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211897 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr61583.c [new file with mode: 0644]
gcc/tree-vrp.c

index 4e567e36d5b724ed3ce7d651f9e269fb47a13402..7979ff98feacddf2a9fb48686d139a075abd4501 100644 (file)
@@ -1,3 +1,9 @@
+2014-06-23  Alan Modra  <amodra@gmail.com>
+
+       PR bootstrap/61583
+       * tree-vrp.c (remove_range_assertions): Do not set is_unreachable
+       to zero on debug statements.
+
 2014-06-19  Alan Lawrence  <alan.lawrence@arm.com>
 
        PR target/60825
@@ -25,7 +31,7 @@
        vsqadd_u64, vsra_n_s64, vsra_n_u64, vsri_n_s64, vsri_n_u64,
        vst1_s64, vst1_u64, vtst_s64, vtst_u64, vuqadd_s64): Wrap existing
        logic in GCC vector extensions
-       
+
        (vpaddd_s64, vaddd_s64, vaddd_u64, vceqd_s64, vceqd_u64, vceqzd_s64
        vceqzd_u64, vcged_s64, vcged_u64, vcgezd_s64, vcgtd_s64, vcgtd_u64,
        vcgtzd_s64, vcled_s64, vcled_u64, vclezd_s64, vcltd_s64, vcltd_u64,
 
 2014-06-18  Robert Suchanek  <robert.suchanek@imgtec.com>
 
-       * lra-constraints.c (base_to_reg): New function.       
-       (process_address): Use new function.                   
+       * lra-constraints.c (base_to_reg): New function.
+       (process_address): Use new function.
 
 2014-06-18  Tom de Vries  <tom@codesourcery.com>
 
index 29aa16cae7bba6bb075914d5203061ea911389e3..33aa8d2920e4e507aec0e374471f324afc78a8ae 100644 (file)
@@ -1,6 +1,10 @@
+2014-06-23  Alan Modra  <amodra@gmail.com>
+
+       * gcc.dg/pr61583.c: New.
+
 2014-06-19  Alan Lawrence  <alan.lawrence@arm.com>
 
-       * g++.dg/abi/mangle-neon-aarch64.C (f22, f23): New tests of 
+       * g++.dg/abi/mangle-neon-aarch64.C (f22, f23): New tests of
        [u]int64x1_t.
 
        * gcc.target/aarch64/aapcs64/func-ret-64x1_1.c: Add {u,}int64x1 cases.
@@ -24,7 +28,7 @@
        test_vqrshrnd_n_u64, test_vshld_n_s64, test_vshdl_n_u64,
        test_vslid_n_s64, test_vslid_n_u64, test_vsrid_n_s64,
        test_vsrid_n_u64): Fix signature to match intrinsic.
-       
+
        (test_vabs_s64): Remove.
        (test_vaddd_s64_2, test_vsubd_s64_2): Use force_simd.
 
diff --git a/gcc/testsuite/gcc.dg/pr61583.c b/gcc/testsuite/gcc.dg/pr61583.c
new file mode 100644 (file)
index 0000000..8424293
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+void
+f1 (int n, int b)
+{
+  extern void f2 (int);
+  int j;
+
+  if (b)
+    n = 1;
+
+  if (n < 1)
+    __builtin_unreachable ();
+
+  for (j = 0; j < n; j++)
+    f2 (j);
+}
index b657546a3d7162684d4912b09fdb57eb5edfe2af..3d0916d457a664dd917c4450bbff473a58ee6474 100644 (file)
@@ -6523,8 +6523,9 @@ remove_range_assertions (void)
          }
        else
          {
+           if (!is_gimple_debug (gsi_stmt (si)))
+             is_unreachable = 0;
            gsi_next (&si);
-           is_unreachable = 0;
          }
       }
 }