summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-5.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-5.c')
-rw-r--r--gcc/testsuite/gcc.dg/uninit-5.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/gcc/testsuite/gcc.dg/uninit-5.c b/gcc/testsuite/gcc.dg/uninit-5.c
deleted file mode 100644
index ac760d69e03..00000000000
--- a/gcc/testsuite/gcc.dg/uninit-5.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Spurious uninitialized-variable warnings.
- These cases are documented as not working in the gcc manual. */
-
-/* { dg-do compile } */
-/* { dg-options "-O -Wuninitialized" } */
-
-extern void use(int);
-extern void foo(void);
-
-void
-func1(int cond)
-{
- int x; /* { dg-bogus "x" "uninitialized variable warning" { xfail *-*-* } } */
-
- if(cond)
- x = 1;
-
- foo();
-
- if(cond)
- use(x);
-}
-
-void
-func2 (int cond)
-{
- int x; /* { dg-bogus "x" "uninitialized variable warning" { xfail *-*-* } } */
- int flag = 0;
-
- if(cond)
- {
- x = 1;
- flag = 1;
- }
-
- foo();
-
- if(flag)
- use(x);
-}