summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/unused-2.c
diff options
context:
space:
mode:
authoroliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-26 07:15:01 +0000
committeroliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-26 07:15:01 +0000
commit941b11856886c7ebfdd6156628c5525ea4e1aec4 (patch)
treea3c6b9ad379c4598fb3ecd7fb698162a6ad46c50 /gcc/testsuite/gcc.dg/unused-2.c
parentde22599f71e9e8197c01e0ec259c32788c0bfb0f (diff)
downloadgcc-941b11856886c7ebfdd6156628c5525ea4e1aec4.tar.gz
* gcc.dg/unused-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31627 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/unused-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/unused-2.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/unused-2.c b/gcc/testsuite/gcc.dg/unused-2.c
new file mode 100644
index 00000000000..cc45dc9baec
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/unused-2.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2000 Free Software Foundation.
+
+ by Alexandre Oliva <oliva@lsd.ic.unicamp.br> */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -finline-functions -Wall" } */
+
+static void
+foo ()
+{
+ skip_it: ; /* { dg-warning "unused label" "unused label warning" } */
+}
+
+void
+bar ()
+{
+ foo ();
+}