diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-12-02 08:54:47 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-12-02 08:54:47 +0100 |
commit | e034c5c895722e0092d2239cd8c2991db77d6d39 (patch) | |
tree | 128171fc7beeba4de19df412d9d8a94d75ce0164 /gcc/expr.c | |
parent | 3b5e1089fedddec6d8299ba1800705b65c574d32 (diff) | |
download | gcc-e034c5c895722e0092d2239cd8c2991db77d6d39.zip gcc-e034c5c895722e0092d2239cd8c2991db77d6d39.tar.gz gcc-e034c5c895722e0092d2239cd8c2991db77d6d39.tar.bz2 |
re PR target/78643 (ICE in convert_move, at expr.c:230)
PR target/78643
PR target/80583
* expr.c (get_inner_reference): If DECL_MODE of a non-bitfield
is BLKmode for vector field with vector raw mode, use TYPE_MODE
instead of DECL_MODE.
* gcc.target/i386/pr80583.c: New test.
From-SVN: r255353
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -7032,7 +7032,16 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize, size. */ mode = TYPE_MODE (DECL_BIT_FIELD_TYPE (field)); else if (!DECL_BIT_FIELD (field)) - mode = DECL_MODE (field); + { + mode = DECL_MODE (field); + /* For vector fields re-check the target flags, as DECL_MODE + could have been set with different target flags than + the current function has. */ + if (mode == BLKmode + && VECTOR_TYPE_P (TREE_TYPE (field)) + && VECTOR_MODE_P (TYPE_MODE_RAW (TREE_TYPE (field)))) + mode = TYPE_MODE (TREE_TYPE (field)); + } else if (DECL_MODE (field) == BLKmode) blkmode_bitfield = true; |