This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
PR 12603 testcase
- From: "Manuel López-Ibáñez" <lopezibanez at gmail dot com>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Mon, 20 Oct 2008 20:07:58 +0200
- Subject: PR 12603 testcase
I would like to commit the following testcase to ensure we do not
regress for PR 12603.
OK for trunk?
2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 12603
* gcc.dg/pr12603.c: New testcase.
Index: gcc/testsuite/gcc.dg/pr12603.c
===================================================================
--- gcc/testsuite/gcc.dg/pr12603.c (revision 0)
+++ gcc/testsuite/gcc.dg/pr12603.c (revision 0)
@@ -0,0 +1,8 @@
+/* PR 12603: No return statement warning on function that never returns with -O3. */
+/* { dg-do compile } */
+/* { dg-options "-O3 -Wall -Wextra -Wreturn-type -Wunreachable-code" } */
+int
+this_function_never_returns ()
+{
+ for (;;);
+}