summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-06-20 21:40:02 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2016-06-20 21:40:02 +0000
commit232a3df7d1034ea2be9b050035c7e11db089005f (patch)
tree1e97efe860be065609527c42d2b0729da6a444fa
parent2ec34e1621508236de40b693b65789f77f3d3e62 (diff)
downloadgcc-232a3df7d1034ea2be9b050035c7e11db089005f.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237620 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr71591.c5
-rw-r--r--gcc/toplev.c5
4 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c76c39b7343..d4b3aae5d6d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 96b664d39a5..4b966e956bc 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 00000000000..e92cb529e60
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/pr71591.c
@@ -0,0 +1,5 @@
+/* PR rtl-optimization/71591 */
+/* { dg-do preprocess } */
+/* { dg-options "-fself-test" } */
+
+/* { dg-message "self-tests incompatible with -E" "" { target *-*-* } 0 } */
diff --git a/gcc/toplev.c b/gcc/toplev.c
index f51d2cb2b77..da80097eb5b 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -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;