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

            Bug ID: 121513
           Summary: Lower bound of an assumed rank variable is 0 instead
                    of 1
           Product: gcc
           Version: 15.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: grofz at vscht dot cz
  Target Milestone: ---

Created attachment 62102
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62102&action=edit
test code

The attached code prints 0 and 1 for lower and upper bound in 1., 2. and 4.
call to a subroutine. However the correct bounds should be 1 and 2, as is the
case in 3., 5. and 6. call. It seems the problem occurs if the array
constructor [...] is used as an actual argument.

Comparing with ifx, same program prints 1 and 2 for all subroutine calls. 

flags used: -Wall -Wextra -fcheck=all
GNU Fortran (conda-forge gcc 15.1.0-4) 15.1.0
GNU Fortran (GCC) 14.3.1 20250523 (Red Hat 14.3.1-1)

Reply via email to