[Bug fortran/79492] LHS reallocation, intrinsic function RHS, and -fcheck=all
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 13 18:54:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79492
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-02-13
CC| |kargl at gcc dot gnu.org,
| |pault at gcc dot gnu.org
Summary|odd behaviour triggered on |LHS reallocation, intrinsic
|applying log function |function RHS, and
| |-fcheck=all
Ever confirmed|0 |1
Known to fail| |6.3.1, 7.0.1
--- Comment #1 from kargl at gcc dot gnu.org ---
This bug appears to date back to
troutmask:sgk[224] svn log -r 167220 | more
------------------------------------------------------------------------
r167220 | pault | 2010-11-28 05:47:26 -0800 (Sun, 28 Nov 2010) | 51 lines
2010-11-28 Paul Thomas <pault@gcc.gnu.org>
The suggested back is
Index: trans-expr.c
===================================================================
--- trans-expr.c (revision 245254)
+++ trans-expr.c (working copy)
@@ -9811,7 +9811,7 @@ gfc_trans_assignment_1 (gfc_expr * expr1
/* Walk the lhs. */
lss = gfc_walk_expr (expr1);
if (gfc_is_reallocatable_lhs (expr1)
- && !(expr2->expr_type == EXPR_FUNCTION
+ && (expr2->expr_type == EXPR_FUNCTION
&& expr2->value.function.isym != NULL))
lss->is_alloc_lhs = 1;
rss = NULL;
In other words, the 2nd part of the if conditional looks to
be meant to disable LHS reallocation if the intrinsic procedure
is NULL(). Paul was that your intention five years ago?
More information about the Gcc-bugs
mailing list