From 179d2f74d481593a39387918f89ef5766d9c64ea Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 8 Dec 2008 09:12:55 -0800 Subject: re PR middle-end/38240 (Vector type definitions not compatible with attribute target) PR 38240 * tree.h (TYPE_MODE): Invoke vector_type_mode when needed. (SET_TYPE_MODE): New. * c-decl.c (parser_xref_tag): Use it. (finish_enum): Likewise. * tree.c (build_pointer_type_for_mode): Likewise. (build_reference_type_for_mode, build_index_type): Likewise. (build_range_type, make_vector_type): Likewise. (build_common_tree_nodes_2): Likewise. * stor-layout.c (compute_record_mode): Likewise. (finalize_type_size, layout_type, make_fract_type): Likewise. (make_accum_type, initialize_sizetypes): Likewise. (vector_type_mode): New. * function.c (allocate_struct_function): Call invoke_set_current_function_hook before querying anything else. * config/i386/i386.c (ix86_valid_target_attribute_inner_p): Add avx. cp/ * class.c (finish_struct_bits): Use SET_TYPE_MODE. * decl.c (record_unknown_type): Likewise. (start_enum, finish_enum): Likewise. From-SVN: r142556 --- gcc/function.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index 0320871f6a8..2ed1748d9ff 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3987,6 +3987,8 @@ allocate_struct_function (tree fndecl, bool abstract_p) OVERRIDE_ABI_FORMAT (fndecl); #endif + invoke_set_current_function_hook (fndecl); + if (fndecl != NULL_TREE) { DECL_STRUCT_FUNCTION (fndecl) = cfun; @@ -4012,8 +4014,6 @@ allocate_struct_function (tree fndecl, bool abstract_p) cfun->va_list_gpr_size = VA_LIST_MAX_GPR_SIZE; cfun->va_list_fpr_size = VA_LIST_MAX_FPR_SIZE; } - - invoke_set_current_function_hook (fndecl); } /* This is like allocate_struct_function, but pushes a new cfun for FNDECL -- cgit v1.2.1