[Bug fortran/41859] ICE on invalid expression involving DT with pointer components in I/O
jvdelisle at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Aug 16 06:10:00 GMT 2010
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2010-08-16 06:09 -------
The problem resides in resolve_transfer. The checks are not performed because
the expression is wrapped in parenthesis and so the expression is of type
EXPR_OP, so resolve_transfer is just exited. The following patch simply finds
the first operand that is not of type EXPR_OP and sets exp to that for
checking.
Index: resolve.c
===================================================================
--- resolve.c (revision 163259)
+++ resolve.c (working copy)
@@ -7696,6 +7696,12 @@
exp = code->expr1;
+ while (exp != NULL && exp->expr_type == EXPR_OP)
+ exp = exp->value.op.op1;
+
+ if (exp == NULL)
+ return;
+
if (exp->expr_type != EXPR_VARIABLE && exp->expr_type != EXPR_FUNCTION)
return;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41859
More information about the Gcc-bugs
mailing list