public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/103707] New: Stray "Array operands are incommensurate"
@ 2021-12-14 10:28 tkoenig at gcc dot gnu.org
  2021-12-14 10:30 ` [Bug fortran/103707] " tkoenig at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2021-12-14 10:28 UTC (permalink / raw)
  To: gcc-bugs

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

            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 = selected_real_kind(15)
  integer, parameter :: sp = selected_real_kind(6)
  integer, parameter :: wp = dp
  real (kind=wp), parameter :: one = 1._wp

end module prec

program main
  use prec
  implicit none
  integer, parameter :: ndim = 6
  real(kind=wp), dimension(ndim), parameter :: &
       fmin = [  0.74_wp, 0.004_wp, 0.002_wp, 0.8_wp,  0._wp,  0.8_wp], &
       fmax = [  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=wp), dimension(ndim), intent(in) :: trial
    real(kind=wp), dimension(ndim) :: xpt
       xpt = fmin * (fmax/fmin)**trial
  end function fld2phys

end program main
[zfkts@loginb001 ~]$ gfortran tst.f90
tst.f90:24:25:

   24 |        xpt = fmin * (fmax/fmin)**trial
      |                         1
Error: Array operands are incommensurate at (1)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-02 17:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 10:28 [Bug fortran/103707] New: Stray "Array operands are incommensurate" tkoenig at gcc dot gnu.org
2021-12-14 10:30 ` [Bug fortran/103707] " tkoenig at gcc dot gnu.org
2021-12-14 16:07 ` anlauf at gcc dot gnu.org
2021-12-14 18:16 ` gscfq@t-online.de
2021-12-14 18:27 ` gscfq@t-online.de
2021-12-15  7:58 ` tkoenig at gcc dot gnu.org
2022-06-26 21:21 ` anlauf at gcc dot gnu.org
2024-03-06 16:57 ` cvs-commit at gcc dot gnu.org
2024-03-06 21:33 ` anlauf at gcc dot gnu.org
2024-04-02 17:07 ` cvs-commit at gcc dot gnu.org
2024-04-02 17:33 ` anlauf at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).