https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121203
Bug ID: 121203
Summary: Incorrect result when character functions are passed
as arguments in a sbroutine
Product: gcc
Version: 15.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jean.vezina at gmail dot com
Target Milestone: ---
Created attachment 61922
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61922&action=edit
Reproducer for the bug
When character functions are passed as arguments in a subroutine using the old
Fortran 77 style, it seems that the argument passed to the function is
corrupted, giving incorrect results.
The compiler version is 15.1.0 installed on a Macbook Pro Silicon running MacOS
Sequoia 15.5. It was installed using Homebrew.
The same test program gives correct results using the Intel ifx compiler.
To reproduce the problem, compile the test program with the command:
gfortran fonction_passee.f90
Run it: ./a.out
Incorrect results are produced.
Thanks in advance,
Jean Vezina