https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84109
Bug ID: 84109 Summary: ICE in adjustl on allocatable array of strings Product: gcc Version: 7.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: wvermin at gmail dot com Target Milestone: --- Created attachment 43273 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43273&action=edit Output on stderr when issuing the command: gfortran a.f90 This program (a.f90): program prog implicit none character(len=:), allocatable:: c(:) allocate(character(len=20) :: c(10)) c = " ab " c = adjustl(c) ! ICE print *,"'",c(1),"'" end program generates an ICE, see attachment for output. gfortran -v: /sara/sw/gcc-7.3.0/bin/gfortran -I/sara/sw/gcc-7.3.0/include -v -L/sara/sw/gcc-7.3.0/lib64 -L/sara/sw/gcc-7.3.0/lib Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/homes/sara/sw/gcc-7.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-7.3.0/configure --prefix=/sara/sw/gcc-7.3.0 --enable-languages=c,c++,fortran Thread model: posix gcc version 7.3.0 (GCC) COMPILER_PATH=/homes/sara/sw/gcc-7.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.0/:/homes/sara/sw/gcc-7.3.0/bin/../libexec/gcc/ LIBRARY_PATH=/homes/sara/sw/gcc-7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/:/homes/sara/sw/gcc-7.3.0/bin/../lib/gcc/:/homes/sara/sw/gcc-7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64/:/lib/x86_64-linux-gnu/:/lib/../lib64/:/usr/lib/x86_64-linux-gnu/:/homes/sara/sw/gcc-7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-I' '/sara/sw/gcc-7.3.0/include' '-v' '-L/sara/sw/gcc-7.3.0/lib64' '-L/sara/sw/gcc-7.3.0/lib' '-mtune=generic' '-march=x86-64' /homes/sara/sw/gcc-7.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.0/collect2 -plugin /homes/sara/sw/gcc-7.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.0/liblto_plugin.so -plugin-opt=/homes/sara/sw/gcc-7.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccK5tPU4.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o /homes/sara/sw/gcc-7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/crtbegin.o -L/sara/sw/gcc-7.3.0/lib64 -L/sara/sw/gcc-7.3.0/lib -L/homes/sara/sw/gcc-7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0 -L/homes/sara/sw/gcc-7.3.0/bin/../lib/gcc -L/homes/sara/sw/gcc-7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/homes/sara/sw/gcc-7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../.. -rpath=/sara/sw/gcc-7.3.0/lib64 -rpath=/sara/sw/gcc-7.3.0/lib -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /homes/sara/sw/gcc-7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/crtend.o /usr/lib/x86_64-linux-gnu/crtn.o /usr/lib/x86_64-linux-gnu/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status