PGF90-F-0000-Internal compiler error. set_assumed_bounds: arg not deferred

Questions on using the PGI Compilers and Tools
Post Reply
Michalakes
Posts: 9
Joined: Mar 20 2006

PGF90-F-0000-Internal compiler error. set_assumed_bounds: arg not deferred

Post by Michalakes » Sat Mar 21, 2020 1:54 pm

Have spent some time trying to get a reproducer for this error:

Code: Select all

PGF90-F-0000-Internal compiler error. set_assumed_bounds: arg not deferred
with no luck so far. Anything small enough to send, the error disappears. This is with Fortran 20.1 as well as an earlier version (19.10). Another compiler (Intel) is happy with the code.

The code that's causing the error is in the interface definition for a type-bound procedure:

Code: Select all

  module subroutine cart2sph_vector(this,q0)
    implicit none
    class(rotate_t),       intent(inout) :: this
    real(kind=r8),         intent(inout) :: q0(:,:)
  end subroutine cart2sph_vector
If I comment out the second argument, q0, and its declaration statement, the problem goes away. I will keep trying to come up with a reproducer, but in the meantime let me please ask: is this legal Fortran in the first place? That is, is it legal to have a deferred-shape dummy array argument in the interface of a type-bound procedure? (The type is not declared as abstract).

Thanks for your advice.

mkcolg
Posts: 8319
Joined: Jun 30 2004

Re: PGF90-F-0000-Internal compiler error. set_assumed_bounds: arg not deferred

Post by mkcolg » Mon Mar 23, 2020 8:27 am

Hi John,

I consulted with some folks here that said the code is indeed legal. Though he notes:
Also to clarify, they’re using an assumed-shape array argument, not a deferred-shape array argument. Arrays declared allocatables/pointer are deferred-shape.

The ICE is misleading in that it says “arg not deferred”. But that’s probably due to a problem with the compiler, not their code.
Since you're having issues reproducing the problem in an example code, can you provide more context about the code? For example, provide a module body with a derived type definition with the type bound procedure and the module subroutine interface?

Thanks,
Mat

Michalakes
Posts: 9
Joined: Mar 20 2006

Re: PGF90-F-0000-Internal compiler error. set_assumed_bounds: arg not deferred

Post by Michalakes » Mon Mar 23, 2020 10:05 am

Hi Mat,
Thanks for the reply and clarification on the terminology.
I will send additional context in an email. Thank you,
John
PS. Hope you're all well.

Post Reply