| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-ch2" } */ |
| 3 |
typedef union tree_node *tree; |
| 4 |
enum tree_code |
| 5 |
{ |
| 6 |
OFFSET_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, POINTER_TYPE, FIXED_POINT_TYPE, |
| 7 |
}; |
| 8 |
struct tree_base |
| 9 |
{ |
| 10 |
unsigned public_flag:1; |
| 11 |
}; |
| 12 |
struct tree_decl_with_vis |
| 13 |
{ |
| 14 |
unsigned comdat_flag:1; |
| 15 |
}; |
| 16 |
union tree_node |
| 17 |
{ |
| 18 |
struct tree_base base; |
| 19 |
struct tree_decl_with_vis decl_with_vis; |
| 20 |
}; |
| 21 |
enum tree_index |
| 22 |
{ |
| 23 |
TI_LONG_DOUBLE_PTR_TYPE, TI_INTEGER_PTR_TYPE, TI_VOID_TYPE, TI_PTR_TYPE, |
| 24 |
TI_VA_LIST_FPR_COUNTER_FIELD, TI_BOOLEAN_TYPE, TI_FILEPTR_TYPE, |
| 25 |
TI_CURRENT_TARGET_PRAGMA, TI_CURRENT_OPTIMIZE_PRAGMA, TI_MAX |
| 26 |
}; |
| 27 |
extern tree global_trees[TI_MAX]; |
| 28 |
void fancy_abort (const char *file, int line, const char *function); |
| 29 |
void |
| 30 |
emit_support_tinfos (void) |
| 31 |
{ |
| 32 |
static tree *const fundamentals[] = { |
| 33 |
&global_trees[TI_VOID_TYPE], &global_trees[TI_BOOLEAN_TYPE], |
| 34 |
}; |
| 35 |
int ix; |
| 36 |
for (ix = 0; fundamentals[ix]; ix++) |
| 37 |
{ |
| 38 |
{ |
| 39 |
tree tinfo; |
| 40 |
{ |
| 41 |
((void) (!(((tinfo)->base.public_flag) && !(__extension__ ( |
| 42 |
{ |
| 43 |
__typeof |
| 44 |
(tinfo) |
| 45 |
__t |
| 46 |
= |
| 47 |
(tinfo); |
| 48 |
__t;} |
| 49 |
)->decl_with_vis. |
| 50 |
comdat_flag)) ? |
| 51 |
fancy_abort ("../../gcc/cp/rtti.c", 1529, |
| 52 |
__FUNCTION__), 0 : 0)); |
| 53 |
} |
| 54 |
} |
| 55 |
} |
| 56 |
} |
| 57 |
/* We should copy loop header to fundamentals[0] and then fold it way into |
| 58 |
known value. */ |
| 59 |
/* { dg-final { scan-tree-dump-not "fundamentals.0" "ch2"} } */ |