https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91359

--- Comment #2 from Brian T. Carcich <briantcarcich at gmail dot com> ---
Agreed that the options -finit-local-zero and -fno-automatic are extraneous;
sorry, they were dragged into here from my Makefile because I need them for the
larger project.

Also, I know how to do a workaround, several in fact, to trick GFORTRAN into
doing the correct thing, as demonstrated by the Github example; that is not the
issue.

The issue is that this *is* a bug in GFORTRAN:  the return on Line 3 (label
00002) should cause GFORTRAN to generate a correct [return __result_zero;], and
not the incorrect naked [return;] that it does now.

Other FORTRAN compilers do that, also earlier version of GFORTRAN, because it
is correct.

If I get some free time I will work on a patch, but I suspect someone familiar
with the code could fix this before I suss out where the fix should be done.

Thanks,

Brian Carcich

Reply via email to