https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108109
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> --- Created attachment 54096 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54096&action=edit valgrind output. (In reply to anlauf from comment #1) > Is this attached file to be preprocessed? Or does it need special options? > Can't reproduce here. I attached the valgrind output (for mainline) and the message fits to what glibc diagnoses. There is simply an invalid READ – and the free is for a bogus address (in the middle of an allocation). As it is for a code which completely fails to compile, I don't think it is of any priority at all - but I did not want to leave it unreported. (Main issue: Several macros not defined, especially those which should expand to a string literal.) * * * Special option: In principle not, but for the main test file, I see differences with and without '-cpp' and not a clear pattern. In particular: No - it isn't. I just run: 'gcc-7 test.f90' (works), gcc-8 ... (works), gcc-9 (glibc's fatal message), gcc-10 (likewise), gcc-10/11/12 (works), mainline (glibc's message). Here, gcc-7 to gcc-10 are the Ubuntu version, gcc-11 to mainline are self compiled. I checked and I don't have _MALLOC_PERTURB set. The big program (MM_GPU_Library_Module.f90), I currently get the message with 'gfortran-9' with and without '-cpp' – but with gfortran mainline, I only get it with -cpp. – I think I got it in different variants also before. That's with Ubuntu 20.04.5 LTS + glibc 2.31-0ubuntu9.9. (Often using something like MALLOC_PERTURB_=... helps, but here it doesn't; probably because calloc and free are involved.)