+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
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. */
#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)