diff --git a/gcc/testsuite/g++.dg/ext/mvc1.C b/gcc/testsuite/g++.dg/ext/mvc1.C
new file mode 100644
index 0000000..27f2409
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mvc1.C
@@ -0,0 +1,34 @@
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+
+__attribute__((ctarget("avx","arch=slm","arch=core-avx2","default")))
+int
+foo ()
+{
+  return -2;
+}
+
+__attribute__((target("avx","arch=core-avx2")))
+int
+bar ()
+{
+  return 2;
+}
+
+__attribute__((target("default")))
+int
+bar ()
+{
+  return 2;
+}
+
+int
+main ()
+{
+  int r = 0;
+  r += bar ();
+  r += foo ();
+  r += bar ();
+  r += foo ();
+  r += bar ();
+  return r - 2;
+}
diff --git a/gcc/testsuite/g++.dg/ext/mvc2.C b/gcc/testsuite/g++.dg/ext/mvc2.C
new file mode 100644
index 0000000..d454282
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mvc2.C
@@ -0,0 +1,8 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+
+__attribute__((ctarget("avx","arch=slm","default")))
+__attribute__((target("avx")))
+int foo (); /* { dg-warning "'target' attribute ignored as it conflict with ctarget" } */
+
+__attribute__((ctarget("avx","arch=slm","default"),always_inline))
+int bar (); /* { dg-warning "'always_inline' attribute ignored as it conflict with ctarget" } */
diff --git a/gcc/testsuite/g++.dg/ext/mvc3.C b/gcc/testsuite/g++.dg/ext/mvc3.C
new file mode 100644
index 0000000..5a7476c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mvc3.C
@@ -0,0 +1,8 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+
+__attribute__((target("avx")))
+__attribute__((ctarget("avx","arch=slm","default")))
+int foo (); /* { dg-warning "'ctarget' attribute ignored as it conflict with target" } */
+
+__attribute__((always_inline,ctarget("avx","arch=slm","default")))
+int bar (); /* { dg-warning "'ctarget' attribute ignored as it assumes noinline" } */
