https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84539
--- Comment #1 from Neil Carlson <neil.n.carlson at gmail dot com> --- And same example but using character data. This compiles but gives a segfault when run at the assignment statement. class(*), allocatable :: x(:) x = ['foo','bar'] select type (x) type is (character(*)) if (any(x /= ['foo','bar'])) stop 1 end select end $ gfortran -g gfortran-20180223b.f90 $ ./a.out Program received signal SIGSEGV: Segmentation fault - invalid memory reference. Backtrace for this error: #0 0x7f40a5b0894f in ??? #1 0x400853 in MAIN__ at gfortran-20180223b.f90:2 #2 0x4009fd in main at gfortran-20180223b.f90:7 Segmentation fault (core dumped)