Compiling module bar implicit none contains ! elemental function trim_append(xx,yy) result(xy) character (len=*), intent(in) :: xx,yy character (len=len(xx) + len(yy)) :: xy xy = trim(xx) // yy end function trim_append ! function same(xx) result(yy) character (len=*), intent(in) :: xx(:) character (len=len(xx)) :: yy(size(xx)) yy = [xx] end function same ! subroutine foo(labels) character (len=*), intent(in) :: labels(:) print*,"size(labels)=",size(labels) end subroutine foo ! subroutine xmain() call foo(trim_append(["a"],same(["b"]))) end subroutine xmain ! end module bar
with gfortran -c xchar_bug.f90 I get xchar_bug.f90: In function 'xmain': xchar_bug.f90:5: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. gfortran -v says gfortran -v Built by Equation Solution (http://www.Equation.com). Using built-in specs. Target: i386-pc-mingw32 Configured with: ../gcc-4.4-20081107-mingw/configure --host=i386-pc-mingw32 --build=x86_64-unknown-linux-gnu --target=i386-pc-mingw32 --prefix=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gcc/4.4-20081107 --with-gcc --with-gnu-ld --with-gnu-as --disable-shared --disable-nls --disable-tls --with-gmp=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gmp --with-mpfr=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpfr --enable-languages=c,c++,fortran --with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cross/x86_32/gcc/4.4-20081107 --enable-libgomp --enable-threads=win32 --disable-win32-registry : (reconfigured) ../gcc-4.4-20081107-mingw/configure --host=i386-pc-mingw32 --build=x86_64-unknown-linux-gnu --target=i386-pc-mingw32 --prefix=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gcc/4.4-20081107 --with-gcc --with-gnu-ld --with-gnu-as --disable-shared --disable-nls --disable-tls --with-gmp=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gmp --with-mpfr=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpfr --enable-languages=c,c++,fortran --with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cross/x86_32/gcc/4.4-20081107 --enable-libgomp --enable-threads=win32 --disable-win32-registry : (reconfigured) ../gcc-4.4-20081107-mingw/configure --host=i386-pc-mingw32 --build=x86_64-unknown-linux-gnu --target=i386-pc-mingw32 --prefix=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gcc/4.4-20081107 --with-gcc --with-gnu-ld --with-gnu-as --disable-shared --disable-nls --disable-tls --with-gmp=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gmp --with-mpfr=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpfr --enable-languages=c,c++,fortran --with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cross/x86_32/gcc/4.4-20081107 --enable-libgomp --enable-threads=win32 --disable-win32-registry Thread model: win32 gcc version 4.4.0 20081107 (experimental) (GCC) -- Summary: character ICE Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vivekrao4 at yahoo dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38095