re PR middle-end/26632 (spurious warning: value computed is not used)
authorKazu Hirata <kazu@gcc.gnu.org>
Wed, 30 Aug 2006 06:00:35 +0000 (06:00 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Wed, 30 Aug 2006 06:00:35 +0000 (06:00 +0000)
PR middle-end/26632
* gcc.dg/pr26632.c: New.

From-SVN: r116580

gcc/testsuite/gcc.dg/pr26632.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/pr26632.c b/gcc/testsuite/gcc.dg/pr26632.c
new file mode 100644 (file)
index 0000000..1cc843e
--- /dev/null
@@ -0,0 +1,14 @@
+/* PR middle-end/26632
+   We used to issue a warning for an implicit cast whose result is not
+   used.  */
+/* { dg-do compile } */
+/* { dg-options "-Wall" } */
+
+int g (void);
+long h (void);
+
+void
+f (void)
+{
+  0 ? h () : g (); /* { dg-bogus "value computed is not used" } */
+}