aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/gcc.dg/uninit-6-O0.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8.1/gcc/testsuite/gcc.dg/uninit-6-O0.c')
-rw-r--r--gcc-4.8.1/gcc/testsuite/gcc.dg/uninit-6-O0.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/gcc-4.8.1/gcc/testsuite/gcc.dg/uninit-6-O0.c b/gcc-4.8.1/gcc/testsuite/gcc.dg/uninit-6-O0.c
deleted file mode 100644
index fe9815efb..000000000
--- a/gcc-4.8.1/gcc/testsuite/gcc.dg/uninit-6-O0.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Spurious uninitialized variable warnings.
- This one inspired by java/class.c:build_utf8_ref. */
-
-/* { dg-do compile } */
-/* { dg-options "-Wuninitialized -ftrack-macro-expansion=2" } */
-
-#include <stddef.h>
-
-struct tree
-{
- struct tree *car;
- struct tree *cdr;
- int type, data;
-};
-
-extern void *malloc(size_t);
-
-#define INTEGER_T 1
-#define PTR_T 2
-
-#define APPEND(TREE, LAST, TYPE, VALUE) \
-do { \
- struct tree *tmp = malloc (sizeof (struct tree)); \
- tmp->car = 0; tmp->cdr = 0; tmp->type = TYPE; \
- tmp->data = VALUE; \
- if (TREE->car) \
- LAST->cdr = tmp; /* { dg-bogus "field" "uninitialized variable warning" { xfail *-*-* } } */ \
- else \
- TREE->car = tmp; \
- LAST = tmp; \
-} while(0)
-
-struct tree *
-make_something(int a, int b, int c)
-{
- struct tree *rv;
- struct tree *field;
-
- rv = malloc (sizeof (struct tree));
- rv->car = 0;
-
- APPEND(rv, field, INTEGER_T, a);
- APPEND(rv, field, PTR_T, b);
- APPEND(rv, field, INTEGER_T, c);
-
- return rv;
-}