This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/32170] string badly passed as function arguments



------- Comment #1 from mikael dot morin at tele2 dot fr  2007-05-31 19:00 -------
$ export FILE=test
$ cat $FILE.f

      program testchar

      character(len=30), dimension(2) :: str1, str2

      str1 = (/ "string1", "string2" /)

      write(6,*) str1


      write(str2(1),*) "string1"
      write(str2(2),*) "string2"

      write(6,*) str2


      end program 



This is the working (reference case)
Note the different spacing (I think it is the write function which is called
twice in the second case). 

$ export FC=gfortran                         
$ $FC -v;$FC -o $FILE $FILE.f ; echo; ./$FILE
Lecture des spécification à partir de
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/specs
Target: x86_64-pc-linux-gnu
Configuré avec: /usr/src/gcc-4.1.2/configure --host=x86_64-pc-linux-gnu
--prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man
--enable-threads=posix --with-system-zlib --enable-languages=f95
--disable-multilib
Modèle de thread: posix
version gcc 4.1.2

 string1                       string2                       
  string1                       string2
$ export FC=/usr/local/bin/gfortran          
$ $FC -v;$FC -o $FILE $FILE.f ; echo; ./$FILE
Utilisation des specs internes.
Target: x86_64-unknown-linux-gnu
Configuré avec: ../gcc-4.3-20070525/configure --enable-languages=fortran
--disable-multilib
Modèle de thread: posix
version gcc 4.3.0 20070525 (experimental)

 string1                       string2                       
  string1                       string2                      


-- 

mikael dot morin at tele2 dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael dot morin at tele2
                   |                            |dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32170


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]