From b52b98849feb98dccfe62a6fc914be3f2e167c1d Mon Sep 17 00:00:00 2001 From: Christian Bruel Date: Thu, 17 Dec 2015 14:56:05 +0100 Subject: tree.h (TYPE_MODE_RAW): New macro. 2015-12-17 Christian Bruel * tree.h (TYPE_MODE_RAW): New macro. * tree-streamer-out.c (pack_ts_type_common_value_fields): Replace TYPE_MODE by TYPE_MODE_RAW. From-SVN: r231758 --- gcc/ChangeLog | 6 ++++++ gcc/tree-streamer-out.c | 5 ++++- gcc/tree.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'gcc') 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 + + * 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 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. */ diff --git a/gcc/tree.h b/gcc/tree.h index 96ffa83..5d1a77c 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -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) -- cgit v1.1