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

--- Comment #19 from Damian Rouson <damian at sourceryinstitute dot org> ---
(In reply to Paul Thomas from comment #16)
> (In reply to Paul Thomas from comment #15)
> > (In reply to Damian Rouson from comment #14)
> > > Hi Paul,
> > > 
> > > Based on comment #12, I assume you no longer believe that type guarding is
> > > required.  If I misinterpreted comment #12, please let me know.

FWIW, I now realize I did misread comment #12.  I focused in on "assert" and
didn't notice the type-guarding in write_formatted above it.


> > 
> > I have to confess that this "interpretation" is arrived at by the absence of
> > any mention of the need for dynamic dispatch and by the implementation by
> > other vendors.

The Cray and PGI compilers accept the in the original bug report.  The Intel
compiler rejects, but I've noticed a lot of problems with UDDTIO in the Intel
compiler over the years so I'll submit a bug report to Intel.

> 
> On thinking about it, is the specific instance of write_formatted allowed?

I believe not.  Note 7.50 of the 31 August 2016 draft Fortran 2015 standard
includes the following:

"The dynamic type of an object cannot be abstract; therefore, a deferred
type-bound procedure cannot be invoked."

I interpret the above quote to mean that write_formatted as written in comment
#15 cannot be invoked.  Presumably that also means it is invalid code. 

Damian

Reply via email to