https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102106
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fxcoudert at gcc dot gnu.org Summary|Intermittent Segfault with |Freeing unallocated memory, |associate to derived type |with associate to derived |with polymorphic component |type with polymorphic | |component Component|libfortran |fortran Last reconfirmed| |2021-12-16 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> --- Confirmed on aarch64-apple-darwin21, where it occurs systematically at -O0 (but not higher optimisation). It is not a library bug, but a front-end issue. The backtrace is the following: * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT * frame #0: 0x00000001c47719b8 libsystem_kernel.dylib`__pthread_kill + 8 frame #1: 0x00000001c47a4eb0 libsystem_pthread.dylib`pthread_kill + 288 frame #2: 0x00000001c46e2314 libsystem_c.dylib`abort + 164 frame #3: 0x00000001c45c7a1c libsystem_malloc.dylib`malloc_vreport + 552 frame #4: 0x00000001c45cb060 libsystem_malloc.dylib`malloc_report + 64 frame #5: 0x00000001c45b9fa8 libsystem_malloc.dylib`free + 500 frame #6: 0x0000000100003ea4 a.out`MAIN__ at a.f90:9:65 frame #7: 0x0000000100003ef4 a.out`main at a.f90:11:11 frame #8: 0x00000001000150f4 dyld`start + 520 There is only one call to free() generated,