diff options
author | Richard Henderson <rth@redhat.com> | 2008-12-08 09:12:55 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2008-12-08 09:12:55 -0800 |
commit | 179d2f74d481593a39387918f89ef5766d9c64ea (patch) | |
tree | 485096f4613a7860b4f1694cbf454cc8dbba8614 /gcc/c-decl.c | |
parent | be6568d8c686fc6d4d7665b9eadc725eabdce39c (diff) | |
download | gcc-179d2f74d481593a39387918f89ef5766d9c64ea.zip gcc-179d2f74d481593a39387918f89ef5766d9c64ea.tar.gz gcc-179d2f74d481593a39387918f89ef5766d9c64ea.tar.bz2 |
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
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 6f88f62..7f7f2b0 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -5302,7 +5302,7 @@ parser_xref_tag (enum tree_code code, tree name) { /* Give the type a default layout like unsigned int to avoid crashing if it does not get defined. */ - TYPE_MODE (ref) = TYPE_MODE (unsigned_type_node); + SET_TYPE_MODE (ref, TYPE_MODE (unsigned_type_node)); TYPE_ALIGN (ref) = TYPE_ALIGN (unsigned_type_node); TYPE_USER_ALIGN (ref) = 0; TYPE_UNSIGNED (ref) = 1; @@ -5952,7 +5952,7 @@ finish_enum (tree enumtype, tree values, tree attributes) TYPE_MAX_VALUE (tem) = TYPE_MAX_VALUE (enumtype); TYPE_SIZE (tem) = TYPE_SIZE (enumtype); TYPE_SIZE_UNIT (tem) = TYPE_SIZE_UNIT (enumtype); - TYPE_MODE (tem) = TYPE_MODE (enumtype); + SET_TYPE_MODE (tem, TYPE_MODE (enumtype)); TYPE_PRECISION (tem) = TYPE_PRECISION (enumtype); TYPE_ALIGN (tem) = TYPE_ALIGN (enumtype); TYPE_USER_ALIGN (tem) = TYPE_USER_ALIGN (enumtype); |