https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87945
David Binderman <dcb314 at hotmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcb314 at hotmail dot com --- Comment #6 from David Binderman <dcb314 at hotmail dot com> --- Not sure this is related, but I tried compiling ./gfortran.dg/pr87945_1.f90 on an asan build of gcc trunk revision 267200 and got this: ./gfortran.dg/pr87945_1.f90 ================================================================= ==30485==ERROR: AddressSanitizer: heap-use-after-free on address 0x617000003ed8 at pc 0x000001323891 bp 0x7fff1aa0dbd0 sp 0x7fff1aa0dbc8 READ of size 8 at 0x617000003ed8 thread T0 #0 0x1323890 in simplify_ref_chain ../../trunk/gcc/fortran/expr.c:1943 #1 0x132226c in gfc_simplify_expr(gfc_expr*, int) ../../trunk/gcc/fortran/expr.c:2164 #2 0x144b2a9 in gfc_match_varspec(gfc_expr*, int, bool, bool) ../../trunk/gcc/fortran/primary.c:2287 #3 0x144d207 in match_variable ../../trunk/gcc/fortran/primary.c:3971 $ ~/gcc/results/bin/gfortran -v Using built-in specs. COLLECT_GCC=/home/dcb/gcc/results/bin/gfortran COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.267200.asan/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../trunk/configure --prefix=/home/dcb/gcc/results.267200.asan --with-build-config=bootstrap-asan --disable-multilib --disable-werror --enable-checking=release --enable-languages=c,c++,fortran Thread model: posix gcc version 9.0.0 20181217 (experimental) (GCC) $