I just now installed FreePGI 15.4 on Mac OS 10.10.3 and got the same kind of warnings:
pgfortran-Warning-Malformed $expr(), nonnumeric value Apple LLVM version 60100 (clang-60200049) (based on LLVM 30600svn)
pgfortran-Warning-Malformed $expr(), nonnumeric value Apple LLVM version 60100 (clang-60200049) (based on LLVM 30600svn)
:
pgfortran-Warning-Malformed $expr(), nonnumeric value Apple LLVM version 60100 (clang-60200049) (based on LLVM 30600svn)
I can confirm that the install Xcode version is 6.3.1 and command line tools are up to date means version 6.3 (April 22, 2015 release). Any solution will be appreciated.
PS: Apart from the noted warnings, the freePGI also fails to compile a code which has overloaded type. I took the same example as given in PGI documentation and attached herewith for consideration.
! Note: Type Overloading is not working with freePGI
module mod_shape
implicit none
private ! hide the type-bound procedure implementation procedures
public :: shape ! allow access to shape
!
! parent type
!
type shape
private
integer :: color
logical :: filled
integer :: x
integer :: y
contains
private
procedure :: initShape ! private type-bound procedure
procedure, public :: print ! allow access to print type-bound procedure
end type shape
!
! child type
!
type, extends(shape) :: rectangle
integer :: length
integer :: width
end type rectangle
!
! grandchild type
!
type, extends(rectangle) :: square
end type square
!
! generic interface
!
interface shape
procedure :: constructor
end interface shape
contains
function constructor (color, filled, x, y) result (res)
implicit none
type(shape) :: res
integer, intent(in) :: color
logical, intent(in) :: filled
integer, intent(in) :: x
integer, intent(in) :: y
call res%initShape (color, filled, x, y)
end function constructor
subroutine initShape (this, color, filled, x, y)
implicit none
class(shape), intent(inout) :: this
integer, intent(in) :: color
logical, intent(in) :: filled
integer, intent(in) :: x
integer, intent(in) :: y
! initialize shape type compoenents
this%color = color
this%filled = filled
this%x = x
this%y = y
end subroutine initShape
subroutine print(this)
implicit none
class(shape), intent(in) :: this
print *, this%color, this%filled, this%x, this%y
end subroutine
end module mod_shape
program test_shape
use mod_shape
implicit none
type(shape) :: sh
! invoke constructor through shape generic interface
sh = shape (5, .true., 100, 200)
call sh%print()
end program test_shape