aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-03-06 12:48:54 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-03-06 12:48:54 +0000
commit1b31fca70f9f410f389363c17d85533d9bb2178a (patch)
treee22b08c997179ffa81a064ca3d36bd24c7b4992e /gcc/fortran/trans.c
parent6cc61b5a37376a87637c1ada009976ae59e134f9 (diff)
downloadgcc-1b31fca70f9f410f389363c17d85533d9bb2178a.zip
gcc-1b31fca70f9f410f389363c17d85533d9bb2178a.tar.gz
gcc-1b31fca70f9f410f389363c17d85533d9bb2178a.tar.bz2
re PR fortran/79894 (ICE in gfc_add_modify_loc, at fortran/trans.c:159)
2017-03-06 Richard Biener <rguenther@suse.de> PR fortran/79894 * trans.c (gfc_add_modify_loc): Weaken assert. From-SVN: r245919
Diffstat (limited to 'gcc/fortran/trans.c')
-rw-r--r--gcc/fortran/trans.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index e25ccaa..2323e0a 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -151,11 +151,11 @@ gfc_add_modify_loc (location_t loc, stmtblock_t * pblock, tree lhs, tree rhs)
tree t1, t2;
t1 = TREE_TYPE (rhs);
t2 = TREE_TYPE (lhs);
- /* Make sure that the types of the rhs and the lhs are the same
+ /* Make sure that the types of the rhs and the lhs are compatible
for scalar assignments. We should probably have something
similar for aggregates, but right now removing that check just
breaks everything. */
- gcc_checking_assert (t1 == t2
+ gcc_checking_assert (TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2)
|| AGGREGATE_TYPE_P (TREE_TYPE (lhs)));
tmp = fold_build2_loc (loc, MODIFY_EXPR, void_type_node, lhs,