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

            Bug ID: 118372
           Summary: Bogus error when passing polymorphic-result function
           Product: gcc
           Version: 13.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: townsend at astro dot wisc.edu
  Target Milestone: ---

Created attachment 60078
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60078&action=edit
Code that demonstrates the issue

When compiling the attached example module (gfortran -c test_pmf.f90) I get the
following bogus error:

test_pmf.f90:34:20:

   34 |       foo = get_foo(foo_factory)
      |                    1
Error: Actual argument for 'foo_factory' must be ALLOCATABLE at (1)

This is using gfortran 13.3.0 on Gentoo Linux 6.6.47-gentoo-x86_64.

Reply via email to