I just merged mainline rev 141167 into lto. This fixes some regression tests. I also needed to add support for the newly added IMPORTED_DECL nodes.
Tested on x86_64 and x86. Diego. * lto-function-in.c (input_imported_decl): New. (input_tree_operand): Handle IMPORTED_DECL. * lto-function-out.c (output_function_decl): Remove handling of DECL_INLINE. (output_imported_decl): New. (output_tree): Handle IMPORTED_DECL. * lto-tags.h (enum LTO_tags): Add LTO_imported_decl. * lto-tree-flags.def: Handle IMPORTED_DECL. lto/ChangeLog * ltrans-driver: Divert output from make to a temporary file. Show it if the call to make failed. 2008-10-16 Diego Novillo <[EMAIL PROTECTED]> Mainline merge @141167. * configure.ac (ACX_PKGVERSION): Update revision merge string. * configure: Regenerate. Index: lto-function-in.c =================================================================== --- lto-function-in.c (revision 141181) +++ lto-function-in.c (working copy) @@ -3157,6 +3157,28 @@ input_namespace_decl (struct lto_input_b return decl; } + +/* Read an IMPORTED_DECL node from IB using descriptors in DATA_IN. */ + +static tree +input_imported_decl (struct lto_input_block *ib, struct data_in *data_in) +{ + tree decl = make_node (IMPORTED_DECL); + + lto_flags_type flags = input_tree_flags (ib, IMPORTED_DECL, true); + if (input_line_info (ib, data_in, flags)) + set_line_info (data_in, decl); + process_tree_flags (decl, flags); + + global_vector_enter (data_in, decl); + + IMPORTED_DECL_ASSOCIATED_DECL (decl) = input_tree (ib, data_in); + DECL_NAME (decl) = input_tree (ib, data_in); + TREE_TYPE (decl) = void_type_node; + LTO_DEBUG_TOKEN ("end_imported_decl"); + + return decl; +} static tree input_translation_unit_decl (struct lto_input_block *ib, struct data_in *data_in) { @@ -3547,6 +3569,10 @@ input_tree_operand (struct lto_input_blo result = input_function_decl (ib, data_in); break; + case IMPORTED_DECL: + result = input_imported_decl (ib, data_in); + break; + case VAR_DECL: if (tag == LTO_var_decl1) { Index: lto-function-out.c =================================================================== --- lto-function-out.c (revision 141181) +++ lto-function-out.c (working copy) @@ -2625,7 +2625,7 @@ output_field_decl (struct output_block * static void output_function_decl (struct output_block *ob, tree decl) { - bool saved_static, saved_inline, saved_external, saved_public; + bool saved_static, saved_external, saved_public; /* tag and flags */ output_global_record_start (ob, NULL, NULL, LTO_function_decl); @@ -2636,17 +2636,14 @@ output_function_decl (struct output_bloc if (lto_forced_static_inline_p (decl)) { saved_static = TREE_STATIC (decl); - saved_inline = DECL_INLINE (decl); saved_external = DECL_EXTERNAL (decl); saved_public = TREE_PUBLIC (decl); TREE_STATIC (decl) = true; - DECL_INLINE (decl) = true; DECL_EXTERNAL (decl) = false; TREE_PUBLIC (decl) = false; output_tree_flags (ob, 0, decl, true); TREE_STATIC (decl) = saved_static; DECL_EXTERNAL (decl) = saved_external; - DECL_INLINE (decl) = saved_inline; TREE_PUBLIC (decl) = saved_public; } else @@ -2927,6 +2924,22 @@ output_namespace_decl (struct output_blo LTO_DEBUG_TOKEN ("end_namespace_decl"); } + +/* Emit IMPORTED_DECL DECL to output block OB. */ + +static void +output_imported_decl (struct output_block *ob, tree decl) +{ + output_global_record_start (ob, NULL, NULL, LTO_imported_decl); + output_tree_flags (ob, 0, decl, true); + global_vector_debug (ob); + output_tree (ob, IMPORTED_DECL_ASSOCIATED_DECL (decl)); + output_tree (ob, DECL_NAME (decl)); + gcc_assert (TREE_TYPE (decl) == void_type_node); + LTO_DEBUG_TOKEN ("end_imported_decl"); +} + + static void output_translation_unit_decl (struct output_block *ob, tree decl) { @@ -3368,6 +3381,10 @@ output_tree (struct output_block *ob, tr output_function_decl (ob, expr); break; + case IMPORTED_DECL: + output_imported_decl (ob, expr); + break; + case VAR_DECL: if (TREE_STATIC (expr) || DECL_EXTERNAL (expr)) output_var_decl (ob, expr); Index: lto-tags.h =================================================================== --- lto-tags.h (revision 141181) +++ lto-tags.h (working copy) @@ -359,6 +359,7 @@ enum LTO_tags { LTO_goto_expr, LTO_gt_expr, LTO_imagpart_expr, + LTO_imported_decl, LTO_identifier_node, LTO_indirect_ref, LTO_integer_cst, Index: lto-tree-flags.def =================================================================== --- lto-tree-flags.def (revision 141181) +++ lto-tree-flags.def (working copy) @@ -378,7 +378,6 @@ ADD_FUN_FLAG (pure_flag) ADD_FUN_FLAG (declared_inline_flag) ADD_FUN_FLAG (regdecl_flag) - ADD_FUN_FLAG (inline_flag) ADD_FUN_FLAG (no_instrument_function_entry_exit) ADD_FUN_FLAG (no_limit_stack) ADD_FUN_FLAG(disregard_inline_limits) @@ -406,6 +405,9 @@ START_EXPR_CASE (IMAGPART_EXPR) END_EXPR_CASE (IMAGPART_EXPR) + + START_EXPR_CASE (IMPORTED_DECL) + END_EXPR_CASE (IMPORTED_DECL) START_EXPR_CASE (INDIRECT_REF) END_EXPR_CASE (INDIRECT_REF) Index: lto/ltrans-driver =================================================================== --- lto/ltrans-driver (revision 141181) +++ lto/ltrans-driver (working copy) @@ -62,4 +62,7 @@ done echo "all: $outputlist" >> $makefile -${MAKE-make} -s -f $makefile all +${MAKE-make} -f $makefile all > $tmp/make.log 2>&1 +if [ $? -ne 0 ] ; then + cat $tmp/make.log +fi