https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109216
Bug ID: 109216 Summary: Wrong behaviour explained in -fno-underscoring documentation Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: rhidalgochar at bloomberg dot net Target Milestone: --- In the documentation section for codegen options it has two parts explaining the behaviour of -fno-underscoring (and implictly -funderscoring) and -fsecond-underscore: https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html However under -fno-underscoring it has an example for -funderscoring that seems to describe the -fsecond-underscore behaviour. Indeed if I compile the following example into an object and look at the symbols I see that j_ and max_count_ are found as undefined symbols, not j_ and max_count__ as suggested, though I do get that if I compile it with -fsecond-underscore. code: program main integer i, j, max_count i = j() + max_count(i, j()) end program main