| 1 |
/* { dg-do compile { target size32plus } } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-dom2-details -w" } */ |
| 3 |
|
| 4 |
union tree_node; |
| 5 |
typedef union tree_node *tree; |
| 6 |
extern unsigned char tree_contains_struct[0xdead][64]; |
| 7 |
struct tree_base |
| 8 |
{ |
| 9 |
int code:16; |
| 10 |
}; |
| 11 |
struct tree_typed |
| 12 |
{ |
| 13 |
tree type; |
| 14 |
}; |
| 15 |
struct tree_type_common |
| 16 |
{ |
| 17 |
tree main_variant; |
| 18 |
}; |
| 19 |
extern tree build_target_option_node (void); |
| 20 |
union tree_node |
| 21 |
{ |
| 22 |
struct tree_base base; |
| 23 |
struct tree_typed typed; |
| 24 |
struct tree_type_common type_common; |
| 25 |
}; |
| 26 |
tree arf (void); |
| 27 |
void error (const char *); |
| 28 |
tree |
| 29 |
convert (tree type, tree expr) |
| 30 |
{ |
| 31 |
tree e = expr; |
| 32 |
int code = (type)->base.code; |
| 33 |
const char *invalid_conv_diag; |
| 34 |
tree ret; |
| 35 |
if (tree_contains_struct[expr->base.code][(42)] != 1) |
| 36 |
__builtin_abort (); |
| 37 |
if (type->type_common.main_variant == expr->typed.type->type_common.main_variant |
| 38 |
&& (expr->typed.type->base.code != 123 |
| 39 |
|| e->base.code == 456)) |
| 40 |
return arf (); |
| 41 |
if (expr->typed.type->base.code == 42) |
| 42 |
error ("void value not ignored as it ought to be"); |
| 43 |
} |
| 44 |
|
| 45 |
/* When the *->base.code tests in the second IF statement are false, we |
| 46 |
know that expr->typed.base->base.code has the value 123. That allows |
| 47 |
us to thread the test for the final IF statement on that path. */ |
| 48 |
/* { dg-final { scan-tree-dump-times "Threaded" 1 "dom2"} } */ |