This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/42008] Wrongly rejected derived types with default initializers in PURE procedures



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]