https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112828
--- Comment #4 from Rich Townsend <townsend at astro dot wisc.edu> --- Another data point for MacOS/Intel (10.13.6, High Sierra) -- with the character vars set to length 64, the crash is as follows: test(3287,0x7fff8fc11380) malloc: *** error for object 0x7fe44cc03b58: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug Program received signal SIGABRT: Process abort signal. Backtrace for this error: #0 0x105c19a5e #1 0x105c18c1d #2 0x7fff57818f59 Abort trap: 6 Again, commenting out the allocate(..., STAT=stat) line makes the problem go away. Reducing the length to <=24 also resolves the problem.