https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942
--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Tue, Jul 21, 2015 at 06:05:05AM +0000, zeccav at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66942 > > --- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> --- > 1) No explicit options, just the default ones, -S will suffice. > 2) Sorry, I did not specify the target is x86-64, but I got the same with -m32 > 3) sub is not needed, the code should just be compiled to exhibit the bug > > I have a sanitized (-fsanitize=address -fsanitize=undefined) version > of gfortran. In the comments I put the output message from the sanitizer > during compilation. I completely missed this as I don't you -fsanitize=. > What happens is that the pointer retargs is NULL. I believe this is bad. > This fragment of code from gfc_conv_procedure_call is thus erroneous > because it dereferences a null pointer. > I did double check it by putting > gcc_assert(retargs); > immediately before its dereferencing. I then got an ICE at that line. It would have been helpful if you had included a diff for your assert in the original report. I think I have a working patch. I know in about 10 seconds. Yep. It works.