summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr30551-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr30551-3.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr30551-3.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr30551-3.c b/gcc/testsuite/gcc.dg/pr30551-3.c
new file mode 100644
index 000000000..bc33187e5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr30551-3.c
@@ -0,0 +1,7 @@
+/* PR 30551 -Wmain is enabled by -pedantic-errors. */
+/* { dg-do compile } */
+/* { dg-options "-pedantic-errors" } */
+/* { dg-skip-if "-Wmain not enabled with -pedantic on SPU" { spu-*-* } } */
+void main(char a) {} /* { dg-error "first argument of .main. should be .int." } */
+/* { dg-error ".main. takes only zero or two arguments" "" { target *-*-* } 5 } */
+/* { dg-error "return type of .main. is not .int." "" { target *-*-* } 5 } */