[Bug fortran/111477] Procedure as actual argument fails against procedure pointer dummy argument

anlauf at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Feb 1 22:07:31 GMT 2025


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

--- Comment #3 from anlauf at gcc dot gnu.org ---
While gfc-14 rejects the code in comment#1,

pr114722-c1.f90:35:22:

   35 |   test_description = test_description_t(do_something)
      |                      1
Error: Component 'test_function_' at (1) is a PRIVATE component of
'test_description_t'

it is accepted by version 15-trunk.
There is only a warning when compiling *without* optimization:

/usr/bin/ld: warning: /tmp/ccYyIdIU.o: requires executable stack (because the
.note.GNU-stack section is executable)


Intel, AMD flang and NAG accept the code silently.
Nvidia generates an error similar to current gcc-14.


More information about the Gcc-bugs mailing list