This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49324] iso_varying_string and reshape fail
- From: "jjcogliati-r1 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 8 Jun 2011 16:30:18 +0000
- Subject: [Bug fortran/49324] iso_varying_string and reshape fail
- Auto-submitted: auto-generated
- References: <bug-49324-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49324
--- Comment #2 from Joshua Cogliati <jjcogliati-r1 at yahoo dot com> 2011-06-08 16:30:16 UTC ---
(In reply to comment #1)
> Not an analysis, just some observations ...
>
> I get different results with different compilers:
> gfortran 4.7:
> array2d second 2 3 '' '@' '`' '`Aïâ' '@' 'Aï'
> [Neither NAG with -C=all -C=undefined, nor ifort -check all, nor gfortran
> -fcheck=all show an error.]
>
>
> I tried also the other ISO Varying String implementations at
> ftp://ftp.nag.co.uk/sc22wg5/ISO_VARYING_STRING/Sample_Module/ , but I fail to
> get a consistent result with those.
>
> gfortran, g95, NAG, pgf90 and pathf95 with iso_vst.f90
> and with g95, pgf90 and pathf95 for iso_vsta.f90:
> array2d second 2 3 '1' '2' '3' 'four' '5' 'six'
> gfortran with iso_vsta.f90:
> array2d second 2 3 '' 'ï' 'ï' 'ïjb' 'ï' 'b'
Hm. http://www.fortran.com/iso_varying_string.f95 and iso_vsta.f90 use:
TYPE VARYING_STRING
PRIVATE
CHARACTER,DIMENSION(:),ALLOCATABLE :: chars
ENDTYPE VARYING_STRING
iso_vst.f90 uses:
TYPE VARYING_STRING
PRIVATE
CHARACTER,DIMENSION(:),POINTER :: chars => NULL()
ENDTYPE VARYING_STRING
so for gfortran at least, it seems to happen when there is a allocatable
character array, but not a pointer.