Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/pr50763-2.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gcc.dg/pr50763-2.c Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,46 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +typedef union tree_node *tree; + +struct tree_base +{ + int code; +}; + +struct tree_typed +{ + struct tree_base base; + tree type; +}; + +struct tree_common +{ + struct tree_typed typed; +}; + +struct tree_type_common +{ + tree main_variant; +}; + +union tree_node +{ + struct tree_base base; + struct tree_typed typed; + struct tree_type_common type_common; +}; + +int std_canonical_va_list_type (tree type) +{ + if (type->base.code) + type = type->typed.type; + else + if (type->typed.type->base.code) + type = type->typed.type; + + if (type->type_common.main_variant) + return 1; + + return 0; +}