http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55199



             Bug #: 55199

           Summary: Equivalenced variable has wrong type when used with

                    generic member function

    Classification: Unclassified

           Product: gcc

           Version: 4.7.3

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: fortran

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: towns...@astro.wisc.edu





Created attachment 28606

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28606

Test program to reproduce the error



The attached program fails to compile, with the following error:



assoc_err.f90:49.8:



    a = a + b

        1

Error: Operands of binary numeric operator '+' at (1) are REAL(4)/TYPE(foo_t)



However, the equivalence statement has b => f%func(1.), which has a type of

REAL(4) and not TYPE(foo_t).



The problem goes away if I replace the generic function reference with a

specific one: b => f%func_1(1.)

Reply via email to