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

--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Paul Thomas from comment #4)
> (In reply to Martin Liška from comment #3)
> > (In reply to Andrew Pinski from comment #2)
> > > (In reply to Martin Liška from comment #1)
> > > > Started with r9-5372-gbbf18dc5d248a79a.
> > > 
> > > Are you sure?
> > 
> > Yes, I am.
> > 
> > > Because the reporter said this:
> > > > This changed between 20211017 and 20211024 :
> > 
> > It's true with disabled checking.
> 
> ifort 2021.1 Beta 20201112 gives:
> ../pr103366/pr103366.f90(8): error #8769: If the actual argument is
> unlimited polymorphic, the corresponding dummy argument must also be
> unlimited polymorphic.   [X]
>       call s(x)
> -------------^
> ../pr103366/pr103366.f90(8): error #8788: This assumed-size or
> nonallocatable nonpointer assumed-rank array is an actual argument
> corresponding to an INTENT(OUT) assumed-rank array dummy so it cannot be
> polymorphic, finalizable, have an allocatable ultimate component, or have
> default initialization.   [X]
>       call s(x)
> -------------^
> compilation aborted for ../pr103366/pr103366.f90 (code 1)
> 
> Paul

>From F2017: 15.5.2.5
The actual argument shall be polymorphic if and only if the associated dummy
argument is polymorphic, and either both the actual and dummy arguments shall
be unlimited polymorphic, or the declared type of the actual argument shall be
the same as the declared type of the dummy argument.

As yet, I have not found the constraints leading to the second error.

Cheers

Paul

Reply via email to