On Wed, Apr 5, 2017 at 10:33 PM, Bill Schmidt <wschm...@linux.vnet.ibm.com> wrote: > On 4/5/17 9:14 AM, Nathan Sidwell wrote: >> >>> Thanks for the patch! Looks like there are some compile problems. I >>> can fix "resut", but not sure what the intent is for "canonical": >> >> I'm a dumbass. I built the x86_64 compiler :( >> try this. >> >> nathan > Thanks! Regtest showed that this blows up on the gcc_assert for Fortran > and Go. If I change the assert to an explicit test, everything is > fine. Corrected patch attached; needs a change log ofc.
Ick. As said, why not do +static tree +rs6000_vt (const char *name, tree elt_type, unsigned num_elts) +{ + tree result = build_vector_type (elt_type, num_elts); + tree orig_name = TYPE_NAME (result); + + /* Tell set_underlying_type to create a clone. */ + TYPE_NAME (result) = error_mark_node; result = build_variant_type_copy (result); + tree named_type = add_builtin_type (name, result); + TYPE_NAME (result) = orig_name; + + if (named_type && TREE_TYPE (named_type) != result) + { + result = TREE_TYPE (named_type); + TREE_USED (result) = true; why's this needed? + } I don't like that error_mark_node hack at all. Richard. > Bill