https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61627

--- Comment #2 from harper at msor dot vuw.ac.nz ---
My diagnosis of the gfortran 4.9.0 error was misleading. Len(head1) was not 1
as
I had thought but 3, so the wrong output may have been due to the
initialization or the write statement, as the following modified program (still
4 lines) and its output show. Version 4.8.2 still gives an ICE with the same
compile-time message.

cayley[~/Jfh] % cat gfbug2.f90
  character(len('xyz')):: head1(2) = (/'a','b'/)
  character(3)         :: head2(2) = (/'x','y'/)
  write(*,'(4A,2I2)') head1,head2,len(head1),len(head2)
end program
cayley[~/Jfh] % gf -v
Using built-in specs.
COLLECT_GCC=/local/scratch/gf/bin/gfortran
COLLECT_LTO_WRAPPER=/local/scratch/gf/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /local/scratch/gcc-4.9.0/configure --prefix=/local/scratch/gf
--enable-languages=c,fortran --disable-libada
--with-local-prefix=/local/scratch --with-gmp=/local/scratch
--with-mpc=/local/scratch/mpc-0.9
Thread model: posix
gcc version 4.9.0 (GCC) 
cayley[~/Jfh] % gf gfbug2.f90
cayley[~/Jfh] % ./a.out
abx  y   3 3
cayley[~/Jfh] %

Reply via email to