Regression on character function

Rouson, Damian rouson@sandia.gov
Mon Feb 6 15:49:00 GMT 2012


Gfortran developers,

A build from a snapshot of the development branch as of two days ago
(installed by macports) appears to have a regression on deferred-length
character functions.  The text below shows a test that compiles with gcc
4.6.2 but not with 4.7.  Should I file a PR?

Damian

$ cat character_function.F90
module foo_class 
  implicit none 
  type foo 
  contains 
    procedure :: bar
  end type 
contains 
  function bar(this)
    class(foo) :: this
    character(:), allocatable :: bar
  end function 
end module 
$ /opt/local/bin/gfortran-mp-4.6 -c character_function.F90
$ /opt/local/bin/gfortran-mp-4.7 -c character_function.F90
character_function.F90:9.22:

    class(foo) :: this
                      1
Error: Deferred-length character component 'bar' at (1) is not yet
supported
$ /opt/local/bin/gfortran-mp-4.7 --version
GNU Fortran (GCC) 4.7.0 20120204 (experimental)
Copyright (C) 2012 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING






More information about the Fortran mailing list