[patch, fortran] PR32360 'DATA PTR1 /NULL ()/' WHEN PTR1 HAS POINTER ATTRIBUTE
Jerry DeLisle
jvdelisle@verizon.net
Sun Jun 17 01:30:00 GMT 2007
:ADDPATCH fortran:
The attached patch allows the test case in the PR to compile. However, it
conflicts with the testcase pr15754.f90. Do we want to allow this assignment as
an extension or should I further refine the checking? Or is it valid to allow
the assignment to NULL as in the PR?
integer, pointer :: ptr1
data ptr1 /NULL()/
end
Regression tested on x86-64-Gnu-Linux.
OK for trunk? Fixing test case appropriately.
Jerry
2007-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/32360
* expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
check to see if the lvalue is a pointer. If it is a pointer, set its
type to match the rvalue and do not issue an error.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr32360.diff
Type: text/x-patch
Size: 912 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070617/b3e81725/attachment.bin>
More information about the Fortran
mailing list