[Bug fortran/42008] Wrongly rejected derived types with default initializers in PURE procedures
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Nov 23 12:38:00 GMT 2009
------- Comment #4 from burnus at gcc dot gnu dot org 2009-11-23 12:38 -------
Does your patch still reject
pure function test()
integer, pointer :: p => null() ! INVALID per C1272
integer :: test
test = p
end function test
That is currently rejected as "Error: Initialization of pointer at (1) is not
allowed in a PURE procedure".
NAG f95 rejects it with:
"ERROR: Local variable P of PURE procedure TEST has the SAVE attribute"
as "p" gets implicitly declared as SAVE. There might well be a check for it in
gfortran already, but seemingly no test case.
If there is no such test case, could you also add it?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42008
More information about the Gcc-bugs
mailing list