Bus error with TRANSFER(vect,mvect) if length > 64

Hi all,

This a bug report comming from a customer. Bus error or segmentation fault happened when we called
mvect=TRANSFER(vect,mvect) with vect length > 64.


OS is Linux and processor architecture is x86_64.

tantal237-michall-> uname -a
Linux tantal237 2.6.9-34.1hp.3sp.XCsmp #1 SMP Thu Sep 7 02:42:28 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux

PGI version is:
tantal237-michall-> pgf90 -V
pgf90 6.2-5 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.

The way to reproduce the issue is:
tantal237-michall-> cat TestBug.sh
#!/bin/sh
set -x
for l in 10 63 64 65 66 100 300
do
echo
pgf90 -DVECT_LENGHT=$l Fortran-TRANSFER-Bug.F90 -Minform=inform ./a.out echo done

tantal237-michall-> cat Fortran-TRANSFER-Bug.F90
PROGRAM testb
IMPLICIT none
CHARACTER(len=VECT_LENGHT) :: vect(1)
real :: mvect(3000)
CHARACTER(len=1), ALLOCATABLE :: cvect(:)
INTEGER :: length
!!$-----------------------
vect(1)=‘a’!(/‘ippaaa0’,‘ippaaa1’,‘ippaaa2’/)
WRITE(,) ‘Say hi!’
mvect=TRANSFER(vect,mvect)
WRITE(,) ‘Toto’
!!$-----------------
END PROGRAM testb
tantal237-michall->

tantal237-michall-> ./TestBug.sh

  • for l in 10 63 64 65 66 100 300
  • echo
  • pgf90 -DVECT_LENGHT=10 Fortran-TRANSFER-Bug.F90 -Minform=inform
  • ./a.out
    Say hi!
    Toto
  • echo
  • for l in 10 63 64 65 66 100 300
  • echo
  • pgf90 -DVECT_LENGHT=63 Fortran-TRANSFER-Bug.F90 -Minform=inform
  • ./a.out
    Say hi!
    Toto
  • echo
  • for l in 10 63 64 65 66 100 300
  • echo
  • pgf90 -DVECT_LENGHT=64 Fortran-TRANSFER-Bug.F90 -Minform=inform
  • ./a.out
    Say hi!
    Toto
  • echo
  • for l in 10 63 64 65 66 100 300
  • echo
  • pgf90 -DVECT_LENGHT=65 Fortran-TRANSFER-Bug.F90 -Minform=inform
  • ./a.out
    Say hi!
    ./TestBug.sh: line 4: 15057 Segmentation fault ./a.out
  • echo
  • for l in 10 63 64 65 66 100 300
  • echo
  • pgf90 -DVECT_LENGHT=66 Fortran-TRANSFER-Bug.F90 -Minform=inform
  • ./a.out
    Say hi!
    ./TestBug.sh: line 4: 15063 Segmentation fault ./a.out
  • echo
  • for l in 10 63 64 65 66 100 300
  • echo
  • pgf90 -DVECT_LENGHT=100 Fortran-TRANSFER-Bug.F90 -Minform=inform
  • ./a.out
    Say hi!
    ./TestBug.sh: line 4: 15069 Bus error ./a.out
  • echo
  • for l in 10 63 64 65 66 100 300
  • echo
  • pgf90 -DVECT_LENGHT=300 Fortran-TRANSFER-Bug.F90 -Minform=inform
  • ./a.out
    Say hi!
    ./TestBug.sh: line 4: 15075 Segmentation fault ./a.out
  • echo

Hi michallon,

This has bug has reported to our compiler team as technical problem report (TPR) #4060.

Thanks you for your report,
Mat