------- Comment #5 from roger at eyesopen dot com 2006-06-22 00:37 ------- Doh! My apologies for the breakage! I think Dave's patch looks good, but the one suggestion that I would make would be to test for MODE_INT first, then call the type_for_mode langhook. This saves calling type_for_mode on unusual modes.
tree tmp = NULL_TREE; if (GET_MODE_CLASS (mode) == MODE_VECTOR_INT || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT) return const_vector_from_tree (exp); if (GET_MODE_CLASS (mode) == MODE_INT) - tmp = fold_unary (VIEW_CONVERT_EXPR, - lang_hooks.types.type_for_mode (mode, 1), - exp); + { + tree type_for_mode = lang_hooks.types.type_for_mode (mode, 1); + if (type_for_mode) + tmp = fold_unary (VIEW_CONVERT_EXPR, type_for_mode, exp); + } if (!tmp) I'll pre-approve that change, it bootstraps and regression tests OK. Unfortunately, extern "C" conflicts for errno in the HPUX system headers mean that I'm unable to test on my HPPA box myself at the moment :-( -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28131