https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113313
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- Created attachment 57034 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57034&action=edit patch to execute_command_line.c Code compiles and runs on FreeBSD. That said, I see % gfcx -o z a.f90 -g && ./z I am john F I am JOHN F % valgrind ./z ==18812== Memcheck, a memory error detector ==18812== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==18812== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info ==18812== Command: ./z ==18812== ==18812== Conditional jump or move depends on uninitialised value(s) ==18812== at 0x4B0AD79: _gfortran_execute_command_line_i4 (execute_command_line.c:203) ==18812== by 0x400B2A: iam.0 (a.f90:15) ==18812== by 0x400BE1: MAIN__ (a.f90:5) ==18812== by 0x400CEF: main (a.f90:6) ==18812== I am john F ==18812== Conditional jump or move depends on uninitialised value(s) ==18812== at 0x4B0AD79: _gfortran_execute_command_line_i4 (execute_command_line.c:203) ==18812== by 0x400B2A: iam.0 (a.f90:15) ==18812== by 0x400C8B: MAIN__ (a.f90:6) ==18812== by 0x400CEF: main (a.f90:6) ==18812== I am JOHN F ==18812== ==18812== HEAP SUMMARY: ==18812== in use at exit: 0 bytes in 0 blocks ==18812== total heap usage: 26 allocs, 26 frees, 9,873 bytes allocated Looking at the code around line 203 suggests that there may be some confusion with setting the error status. The attached patch allows the code to run without the valgrind warnings.