2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr50763-2.c
bloba9d12e8f543e726cf6dc3ddc4aa8f27af7165631
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 typedef union tree_node *tree;
6 struct tree_base
8 int code;
9 };
11 struct tree_typed
13 struct tree_base base;
14 tree type;
17 struct tree_common
19 struct tree_typed typed;
22 struct tree_type_common
24 tree main_variant;
27 union tree_node
29 struct tree_base base;
30 struct tree_typed typed;
31 struct tree_type_common type_common;
34 int std_canonical_va_list_type (tree type)
36 if (type->base.code)
37 type = type->typed.type;
38 else
39 if (type->typed.type->base.code)
40 type = type->typed.type;
42 if (type->type_common.main_variant)
43 return 1;
45 return 0;