re PR rtl-optimization/71591 (SIGSEGV in test_uncond_jump (rtl-tests.c:90) with ...
authorJakub Jelinek <jakub@redhat.com>
Mon, 20 Jun 2016 21:40:02 +0000 (23:40 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 20 Jun 2016 21:40:02 +0000 (23:40 +0200)
PR rtl-optimization/71591
* toplev.c (toplev::run_self_tests): If no_backend, complain and
don't run any tests.

* gcc.dg/cpp/pr71591.c: New test.

From-SVN: r237620

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/pr71591.c [new file with mode: 0644]
gcc/toplev.c

index c76c39b7343a983d45b738d1872a85728ad2be43..d4b3aae5d6d686b0efd195c313a6f53608287a2c 100644 (file)
@@ -1,3 +1,9 @@
+2016-06-20  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/71591
+       * toplev.c (toplev::run_self_tests): If no_backend, complain and
+       don't run any tests.
+
 2016-06-20  Hans-Peter Nilsson  <hp@axis.com>
 
        PR target/71571
index 96b664d39a54f85b00d16368be1a9c432a6574bd..4b966e956bc9da38a0a0895fc1758879f1c5b57e 100644 (file)
@@ -1,3 +1,8 @@
+2016-06-20  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/71591
+       * gcc.dg/cpp/pr71591.c: New test.
+
 2016-06-20   David B. Robins  <gcc@davidrobins.net>
 
        PR target/71571
diff --git a/gcc/testsuite/gcc.dg/cpp/pr71591.c b/gcc/testsuite/gcc.dg/cpp/pr71591.c
new file mode 100644 (file)
index 0000000..e92cb52
--- /dev/null
@@ -0,0 +1,5 @@
+/* PR rtl-optimization/71591 */
+/* { dg-do preprocess } */
+/* { dg-options "-fself-test" } */
+
+/* { dg-message "self-tests incompatible with -E" "" { target *-*-* } 0 } */
index f51d2cb2b77eccf338154961745386e3343a3a9a..da80097eb5b378da2dacdd98e965aa4a04517fe6 100644 (file)
@@ -2047,6 +2047,11 @@ toplev::start_timevars ()
 void
 toplev::run_self_tests ()
 {
+  if (no_backend)
+    {
+      error_at (UNKNOWN_LOCATION, "self-tests incompatible with -E");
+      return;
+    }
 #if CHECKING_P
   /* Reset some state.  */
   input_location = UNKNOWN_LOCATION;