summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr23075.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr23075.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr23075.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr23075.c b/gcc/testsuite/gcc.dg/pr23075.c
new file mode 100644
index 000000000..2d85fb065
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr23075.c
@@ -0,0 +1,14 @@
+/* PR c/23075 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wreturn-type" } */
+
+int
+foo (void)
+{
+ return; /* { dg-warning "with no value" } */
+} /* { dg-bogus "control reaches end" } */
+
+int
+bar (void)
+{
+} /* { dg-warning "control reaches end" } */