optional,allocatable compilation error

I get the following error with the last version of the fortran pgi compiler:

pgf90 tr.f90
PGF90-S-0134-Illegal attribute - conflict with allocatable (tr.f90: 18)
PGF90/x86-64 Linux 7.2-5: compilation completed with severe errors

where tr.f90 is:

program tr
  integer, allocatable :: a(:), b(:),c(:)

  allocate(a(10))
  a = (/ (i,i=1,10) /)
  call foo(a,b,c)
  write(*,*) b
  write(*,*) c

contains

  subroutine foo(a,b,c)

    implicit none
    integer, allocatable, intent(inout) :: a(:)
    integer, allocatable, intent(out) :: b(:)
    integer, optional, allocatable, intent(out) :: c(:)

    allocate(b(size(a)))
    if (present(c)) allocate(c(size(a)))

  end subroutine foo

end program tr

The code is correctly compiled by other compiler like intel, gnu and xlf.
Is a bug in the pgi compiler or these fortran 2003 features are not still supported?
Thanks.

Hi rorro,

Thank you for the example! The problem is with the PGI compiler and I’ve filed a technical problem report (TPR#15338). Hopefully we’ll be able to get the fix for this into our upcoming 8.0-1 release. If not, it should be available in the first patch release (8.0-2).

Best Regards,
Mat