aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/pr42674.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/pr42674.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/pr42674.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/pr42674.c b/gcc-4.9/gcc/testsuite/c-c++-common/pr42674.c
new file mode 100644
index 000000000..ae6730c50
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/pr42674.c
@@ -0,0 +1,13 @@
+/* PR middle-end/42674 */
+/* { dg-do compile } */
+/* { dg-options "-Wreturn-type" } */
+
+extern void bar (void);
+static int foo (void) __attribute__ ((__noreturn__, __used__));
+
+static int
+foo (void)
+{
+ while (1)
+ bar ();
+}