aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr42674.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/c-c++-common/pr42674.c')
-rw-r--r--gcc/testsuite/c-c++-common/pr42674.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/pr42674.c b/gcc/testsuite/c-c++-common/pr42674.c
new file mode 100644
index 0000000..ae6730c
--- /dev/null
+++ b/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 ();
+}