[patch, fortran] PR41859 ICE on invalid expression involving DT with pointer components in I/O
Jerry DeLisle
jvdelisle@verizon.net
Tue Aug 17 02:22:00 GMT 2010
Hi,
This patch is fairly simple. The ICE occurred because in resolve.c
(resolve_transfer) the checking for invalid was being skipped. When the
io_element is enclosed in parenthesis, the resulting expression presented to
resolve_transfer is expr_type == EXPR_OP. Existing code just treated this as a
case of neither a variable or function.
The patch traverses down the operands until a non EXPR_OP type expression or
NULL is found. It is necessary to traverse this way because one can have
multiple levels of parenthesis. Attempting to simplify the expression did not
work. (I suspect because we try to preserve parens for use in translation, not sure)
Regression tested on i686-linux-gnu.
OK for trunk?
Regards,
Jerry
2010-08-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/41859
* resolve.c (resolve_transfer): Traverse operands and set expression
to be checked to a non EXPR_OP type.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr41859.diff
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100817/38fe2086/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: der_io_4.f90
Type: text/x-fortran
Size: 314 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100817/38fe2086/attachment-0001.bin>
More information about the Fortran
mailing list