Problems with logical(1)

> pgf95 -V
pgf95 6.2-3 64-bit target on x86-64 Linux
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2006, STMicroelectronics, Inc.  All Rights Reserved.

> cat error.f90
program logical_error
  implicit none

  integer, parameter :: KP = 1
  integer, parameter :: N = 28

  logical(KP), dimension(N) :: good

  good = .false.
  print *, good

end program logical_error

> pgf95 -Mstandard -o error error.f90
PGF90-S-0091-Constant expression of wrong data type (error.f90: 12)
  0 inform,   0 warnings,   1 severes, 0 fatal for logical_error

> pgf95 -o error error.f90
> ./error
     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0

I see two problems here:

  1. Using the -Mstandard flag produces a spurious error.
  2. The print out of error gives zeroes instead of Fs.

Am I right in thinking these are errors in pgf95? If so, does the most recent version correct these issues?

Hi,

Thanks for reporting to us. We have filed a TPR#14250. For a workaround for now would be change KP to 2.

Hongyon

Another workaround is use -Munixlogical.

Hongyon

Hi,

This will be fixed in 7.2 release.

Thank you,
Hongyon

Hi,

This problem is fixed in your latest release 7.2.

Thank you,
Hongyon