summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr22231.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr22231.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr22231.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr22231.c b/gcc/testsuite/gcc.dg/pr22231.c
new file mode 100644
index 000000000..210700684
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr22231.c
@@ -0,0 +1,7 @@
+/* Test case for PR 22231. -c and -MG are invalid together. */
+
+/* { dg-do compile } */
+/* { dg-options "-MG -MD -c" } */
+/* { dg-error "may only be used with -M" "-MG incompatible with -c" { target *-*-* } 0 } */
+
+int anything;