diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-streamer-out.c | 5 | ||||
-rw-r--r-- | gcc/tree.h | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f836652..1db66d6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-12-17 Christian Bruel <christian.bruel@st.com> + + * tree.h (TYPE_MODE_RAW): New macro. + * tree-streamer-out.c (pack_ts_type_common_value_fields): + Replace TYPE_MODE by TYPE_MODE_RAW. + 2015-12-17 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/68835 diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index bfd0644..ddb7eee 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -308,7 +308,10 @@ pack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr) static void pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr) { - bp_pack_machine_mode (bp, TYPE_MODE (expr)); + /* for VECTOR_TYPE, TYPE_MODE reevaluates the mode using target_flags + not necessary valid in a global context. + Use the raw value previously set by layout_type. */ + bp_pack_machine_mode (bp, TYPE_MODE_RAW (expr)); bp_pack_value (bp, TYPE_STRING_FLAG (expr), 1); /* TYPE_NO_FORCE_BLK is private to stor-layout and need no streaming. */ @@ -1793,6 +1793,7 @@ extern void protected_set_expr_location (tree, location_t); #define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->type_common.main_variant) #define TYPE_CONTEXT(NODE) (TYPE_CHECK (NODE)->type_common.context) +#define TYPE_MODE_RAW(NODE) (TYPE_CHECK (NODE)->type_common.mode) #define TYPE_MODE(NODE) \ (VECTOR_TYPE_P (TYPE_CHECK (NODE)) \ ? vector_type_mode (NODE) : (NODE)->type_common.mode) |