From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4BD453858418; Tue, 14 Dec 2021 10:28:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4BD453858418 From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103707] New: Stray "Array operands are incommensurate" Date: Tue, 14 Dec 2021 10:28:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2021 10:28:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103707 Bug ID: 103707 Summary: Stray "Array operands are incommensurate" Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: tkoenig at gcc dot gnu.org Target Milestone: --- Just stumbled across this... module prec implicit none private public :: wp integer, parameter :: dp =3D selected_real_kind(15) integer, parameter :: sp =3D selected_real_kind(6) integer, parameter :: wp =3D dp real (kind=3Dwp), parameter :: one =3D 1._wp end module prec program main use prec implicit none integer, parameter :: ndim =3D 6 real(kind=3Dwp), dimension(ndim), parameter :: & fmin =3D [ 0.74_wp, 0.004_wp, 0.002_wp, 0.8_wp, 0._wp, 0.8_wp], & fmax =3D [ 1.93_wp, 0.26_wp, 0.127_wp, 4.0_wp, 1.2_wp, 1.0_wp] contains function fld2phys (trial) result (xpt) real(kind=3Dwp), dimension(ndim), intent(in) :: trial real(kind=3Dwp), dimension(ndim) :: xpt xpt =3D fmin * (fmax/fmin)**trial end function fld2phys end program main [zfkts@loginb001 ~]$ gfortran tst.f90 tst.f90:24:25: 24 | xpt =3D fmin * (fmax/fmin)**trial | 1 Error: Array operands are incommensurate at (1)=