This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add new tests for --completion option.
- From: Martin Liška <mliska at suse dot cz>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Cc: David Malcolm <dmalcolm at redhat dot com>
- Date: Fri, 29 Jun 2018 11:20:49 +0200
- Subject: [PATCH] Add new tests for --completion option.
- References: <3c2e7f32-438a-57a3-96a8-3e9d3fc7f605@suse.cz>
Hi.
I would like to add some DejaGNU tests for completion option.
Ready for trunk?
Martin
>From a735068032aa9ce82e5f56172f1b99bc2c90ac0f Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 29 Jun 2018 11:18:21 +0200
Subject: [PATCH] Add new tests for --completion option.
gcc/testsuite/ChangeLog:
2018-06-29 Martin Liska <mliska@suse.cz>
* gcc.dg/completion-1.c: New test.
* gcc.dg/completion-2.c: New test.
* gcc.dg/completion-3.c: New test.
---
gcc/testsuite/gcc.dg/completion-1.c | 8 ++++++++
gcc/testsuite/gcc.dg/completion-2.c | 10 ++++++++++
gcc/testsuite/gcc.dg/completion-3.c | 13 +++++++++++++
3 files changed, 31 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/completion-1.c
create mode 100644 gcc/testsuite/gcc.dg/completion-2.c
create mode 100644 gcc/testsuite/gcc.dg/completion-3.c
diff --git a/gcc/testsuite/gcc.dg/completion-1.c b/gcc/testsuite/gcc.dg/completion-1.c
new file mode 100644
index 00000000000..64da64f1c69
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/completion-1.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "--completion=-fipa-ic" } */
+
+/* { dg-begin-multiline-output "" }
+-fipa-icf
+-fipa-icf-functions
+-fipa-icf-variables
+ { dg-end-multiline-output "" } */
diff --git a/gcc/testsuite/gcc.dg/completion-2.c b/gcc/testsuite/gcc.dg/completion-2.c
new file mode 100644
index 00000000000..ac7508591de
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/completion-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "--completion=-flto-parti" } */
+
+/* { dg-begin-multiline-output "" }
+-flto-partition=1to1
+-flto-partition=balanced
+-flto-partition=max
+-flto-partition=none
+-flto-partition=one
+ { dg-end-multiline-output "" } */
diff --git a/gcc/testsuite/gcc.dg/completion-3.c b/gcc/testsuite/gcc.dg/completion-3.c
new file mode 100644
index 00000000000..3c4a89ffdd5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/completion-3.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "--completion=--param=asan-" } */
+
+/* { dg-begin-multiline-output "" }
+--param=asan-stack
+--param=asan-instrument-allocas
+--param=asan-globals
+--param=asan-instrument-writes
+--param=asan-instrument-reads
+--param=asan-memintrin
+--param=asan-use-after-return
+--param=asan-instrumentation-with-call-threshold
+ { dg-end-multiline-output "" } */
--
2.17.1