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  <[EMAIL PROTECTED]>

        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 (;;);
+}

Reply via email to