This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 12603 testcase
- From: "Manuel López-Ibáñez" <lopezibanez at gmail dot com>
- To: "Gcc Patch List" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 20 Oct 2008 20:08:38 +0200
- Subject: Re: PR 12603 testcase
- References: <6c33472e0810201107u7c2a54cbr54c09788ce3567cf@mail.gmail.com>
Sorry I sent this to the wrong list.
2008/10/20 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> 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 (;;);
+}