[Bug fortran/78640] [F2015] gfortran accepts invalid allocatable polymorphic result in pure function

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Fri Dec 2 10:35:00 GMT 2016


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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-12-02
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The constraint is C1287 in my draft. Confirmed from 4.9 up to trunk (7.0).
Gfortran 4.8 gives the following error

pr78640.f90:4.8:

  bar = f()
        1
Error: Can't convert CLASS(foo) to TYPE(foo) at (1)


More information about the Gcc-bugs mailing list