A number of the "variant" testcases fail to build on AIX and targets that use stabs. The failure looks like:
/tmp/GCC/powerpc-ibm-aix7.2.0.0/libstdc++-v3/include/variant:956: internal compiler error: tree check: expected field_decl, have template_decl in int_bit_position, at tree.h:5396 which occurs in dbxout_type_fields() /* Output the name, type, position (in bits), size (in bits) of each field that we can support. */ for (tem = TYPE_FIELDS (type); tem; tem = DECL_CHAIN (tem)) ... if (VAR_P (tem)) { ... } else { stabstr_C (','); stabstr_D (int_bit_position (tem)); stabstr_C (','); stabstr_D (tree_to_uhwi (DECL_SIZE (tem))); stabstr_C (';'); } where tem is a TEMPLATE_DECL. The dbxout code currently skips TYPE_DECL, nameless fields, and CONST_DECL. dbxout_type_methods() explicitly skips TEMPLATE_DECLs with the comment "The debugger doesn't know what to do with such entities anyhow", so this proposed patch skips them in dbxout_type_fields() as well. Okay? Thanks, David PR debug/66419 PR c++/78235 * dbxout.c (dbxout_type_fields): Skip TEMPLATE_DECLs. Index: dbxout.c =================================================================== --- dbxout.c (revision 243118) +++ dbxout.c (working copy) @@ -1479,6 +1479,7 @@ dbxout_type_fields (tree type) /* Omit here local type decls until we know how to support them. */ if (TREE_CODE (tem) == TYPE_DECL + || TREE_CODE (tem) == TEMPLATE_DECL /* Omit here the nameless fields that are used to skip bits. */ || DECL_IGNORED_P (tem) /* Omit fields whose position or size are variable or too large to