Open ecossevin opened 1 month ago
Thanks, we seem to indeed not have a representation of assumed size dimensions. Here's a pytest reproducing the issue and capturing all relevant cases that seem to be allowed in Fortran:
@pytest.mark.parametrize('frontend', available_frontends())
def test_array_assumed_size(frontend):
fcode = """
SUBROUTINE TOTO(KPROMA, A, B, C, POUT1)
IMPLICIT NONE
INTEGER, INTENT (IN) :: KPROMA
INTEGER, INTENT (INOUT) :: A(5, *), B(*), C(0:1, 2:*)
REAL , INTENT (OUT) :: POUT1 (KPROMA, *)
SUBROUTINE PULLDOWN ( A, B, C )
END SUBROUTINE TOTO
""".strip()
routine = Subroutine.from_source(fcode, frontend=frontend)
The precise format of representing this needs to be discussed, though.
sub.F90
:test.py
:test.py
(fgen) returns wrong dimensions forPOUT1
:REAL, INTENT(OUT) :: POUT1((KPROMA,):)
Thanks in advance for your help.