Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-pred-10.c
blob468b4d3ad4bd88ef6404d571b84482394bba8d30
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wuninitialized" } */
4 enum demangle_component_type {
5 DEMANGLE_COMPONENT_NAME,
6 DEMANGLE_COMPONENT_REFERENCE
7 };
8 struct demangle_component {
9 enum demangle_component_type type;
10 } d_print_comp_inner_mod_inner, *d_print_comp_inner_dc;
11 struct d_print_mod {
12 struct d_print_mod *next;
14 struct d_print_info {
15 int templates;
16 struct d_print_mod *modifiers;
18 void d_print_comp_inner(struct d_print_info *dpi)
20 int saved_templates, need_template_restore = 0;
21 switch (d_print_comp_inner_dc->type) {
22 case DEMANGLE_COMPONENT_NAME:
23 goto modifier;
24 case DEMANGLE_COMPONENT_REFERENCE:
25 saved_templates = dpi->templates;
26 need_template_restore = 1;
27 modifier:
28 struct d_print_mod dpm;
29 dpm.next = dpi->modifiers;
30 d_print_comp_inner_mod_inner = *d_print_comp_inner_dc;
31 d_print_comp_inner(dpi);
32 dpi->modifiers = dpm.next;
33 if (need_template_restore)
34 dpi->templates = saved_templates; /* { dg-bogus "uninitialized" } */