diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-03-06 12:48:54 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-03-06 12:48:54 +0000 |
commit | edfa363756387315a4b32d50810e670cf1f86560 (patch) | |
tree | e22b08c997179ffa81a064ca3d36bd24c7b4992e /gcc/fortran | |
parent | e328d74fc432ad9af615f4bfb0b032129cca5b1c (diff) | |
download | gcc-edfa363756387315a4b32d50810e670cf1f86560.tar.gz |
2017-03-06 Richard Biener <rguenther@suse.de>
PR fortran/79894
* trans.c (gfc_add_modify_loc): Weaken assert.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245919 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8640646127c..5c99ca70f48 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2017-03-06 Richard Biener <rguenther@suse.de> + + PR fortran/79894 + * trans.c (gfc_add_modify_loc): Weaken assert. + 2017-03-05 Andre Vehreschild <vehre@gcc.gnu.org>, Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index e25ccaa258a..2323e0abe3d 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, |