summaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-in.c
diff options
context:
space:
mode:
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-10 15:22:30 +0000
committertschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-10 15:22:30 +0000
commitb308f4a0d03e67bdaf3f43416cfbd360db957a29 (patch)
tree8a8774799581261f44d24469fba467584fca849c /gcc/lto-streamer-in.c
parent7231f6b984806cceb30cacf0e79f8f5ae7a68803 (diff)
downloadgcc-b308f4a0d03e67bdaf3f43416cfbd360db957a29.tar.gz
Fix offloading machine mode stream reading
... in context of the GET_MODE_INNER changes applied in r226328. gcc/ * lto-streamer-in.c (lto_input_mode_table): Adjust to GET_MODE_INNER changes. libgomp/ * testsuite/libgomp.oacc-c-c++-common/vector-type-1.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226759 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r--gcc/lto-streamer-in.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 299900ae379..2eb80511b91 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -1544,7 +1544,7 @@ lto_input_mode_table (struct lto_file_decl_data *file_data)
= bp_unpack_enum (&bp, mode_class, MAX_MODE_CLASS);
unsigned int size = bp_unpack_value (&bp, 8);
unsigned int prec = bp_unpack_value (&bp, 16);
- machine_mode inner = (machine_mode) table[bp_unpack_value (&bp, 8)];
+ machine_mode inner = (machine_mode) bp_unpack_value (&bp, 8);
unsigned int nunits = bp_unpack_value (&bp, 8);
unsigned int ibit = 0, fbit = 0;
unsigned int real_fmt_len = 0;
@@ -1578,7 +1578,9 @@ lto_input_mode_table (struct lto_file_decl_data *file_data)
if (GET_MODE_CLASS (mr) != mclass
|| GET_MODE_SIZE (mr) != size
|| GET_MODE_PRECISION (mr) != prec
- || GET_MODE_INNER (mr) != inner
+ || (inner == m
+ ? GET_MODE_INNER (mr) != mr
+ : GET_MODE_INNER (mr) != table[(int) inner])
|| GET_MODE_IBIT (mr) != ibit
|| GET_MODE_FBIT (mr) != fbit
|| GET_MODE_NUNITS (mr) != nunits)
@@ -1606,7 +1608,7 @@ lto_input_mode_table (struct lto_file_decl_data *file_data)
case MODE_VECTOR_UACCUM:
/* For unsupported vector modes just use BLKmode,
if the scalar mode is supported. */
- if (inner != VOIDmode)
+ if (table[(int) inner] != VOIDmode)
{
table[m] = BLKmode;
break;