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/cp | |
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/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/class.c | 2 | ||||
-rw-r--r-- | gcc/cp/decl.c | 8 |
3 files changed, 12 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dab6ed0..662fe32 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2008-12-08 Richard Henderson <rth@redhat.com> + + PR 38240 + * class.c (finish_struct_bits): Use SET_TYPE_MODE. + * decl.c (record_unknown_type): Likewise. + (start_enum, finish_enum): Likewise. + 2008-12-05 Jakub Jelinek <jakub@redhat.com> PR c++/35336 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 8553139..97ab9e3 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -1494,7 +1494,7 @@ finish_struct_bits (tree t) DECL_MODE (TYPE_MAIN_DECL (t)) = BLKmode; for (variants = t; variants; variants = TYPE_NEXT_VARIANT (variants)) { - TYPE_MODE (variants) = BLKmode; + SET_TYPE_MODE (variants, BLKmode); TREE_ADDRESSABLE (variants) = 1; } } diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 70ccd32..e786b39 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3199,7 +3199,7 @@ record_unknown_type (tree type, const char* name) TYPE_SIZE (type) = TYPE_SIZE (void_type_node); TYPE_ALIGN (type) = 1; TYPE_USER_ALIGN (type) = 0; - TYPE_MODE (type) = TYPE_MODE (void_type_node); + SET_TYPE_MODE (type, TYPE_MODE (void_type_node)); } /* A string for which we should create an IDENTIFIER_NODE at @@ -10912,7 +10912,7 @@ start_enum (tree name, tree underlying_type, bool scoped_enum_p) TYPE_MAX_VALUE (enumtype) = TYPE_MAX_VALUE (underlying_type); TYPE_SIZE (enumtype) = TYPE_SIZE (underlying_type); TYPE_SIZE_UNIT (enumtype) = TYPE_SIZE_UNIT (underlying_type); - TYPE_MODE (enumtype) = TYPE_MODE (underlying_type); + SET_TYPE_MODE (enumtype, TYPE_MODE (underlying_type)); TYPE_PRECISION (enumtype) = TYPE_PRECISION (underlying_type); TYPE_ALIGN (enumtype) = TYPE_ALIGN (underlying_type); TYPE_USER_ALIGN (enumtype) = TYPE_USER_ALIGN (underlying_type); @@ -11065,7 +11065,7 @@ finish_enum (tree enumtype) applied to the underlying type. */ TYPE_SIZE (enumtype) = TYPE_SIZE (underlying_type); TYPE_SIZE_UNIT (enumtype) = TYPE_SIZE_UNIT (underlying_type); - TYPE_MODE (enumtype) = TYPE_MODE (underlying_type); + SET_TYPE_MODE (enumtype, TYPE_MODE (underlying_type)); TYPE_ALIGN (enumtype) = TYPE_ALIGN (underlying_type); TYPE_USER_ALIGN (enumtype) = TYPE_USER_ALIGN (underlying_type); TYPE_UNSIGNED (enumtype) = TYPE_UNSIGNED (underlying_type); @@ -11133,7 +11133,7 @@ finish_enum (tree enumtype) TYPE_MAX_VALUE (t) = TYPE_MAX_VALUE (enumtype); TYPE_SIZE (t) = TYPE_SIZE (enumtype); TYPE_SIZE_UNIT (t) = TYPE_SIZE_UNIT (enumtype); - TYPE_MODE (t) = TYPE_MODE (enumtype); + SET_TYPE_MODE (t, TYPE_MODE (enumtype)); TYPE_PRECISION (t) = TYPE_PRECISION (enumtype); TYPE_ALIGN (t) = TYPE_ALIGN (enumtype); TYPE_USER_ALIGN (t) = TYPE_USER_ALIGN (enumtype); |