public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/62106] New: Adding a scalar variable to an array constructor gives wrong result
@ 2014-08-12  9:34 m.a.hulsen at tue dot nl
  2014-08-12  9:45 ` [Bug fortran/62106] " m.a.hulsen at tue dot nl
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: m.a.hulsen at tue dot nl @ 2014-08-12  9:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 62106
           Summary: Adding a scalar variable to an array constructor gives
                    wrong result
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: m.a.hulsen at tue dot nl

The following code

program t
  integer :: ndim=2, ndfp=4, i
  print *, (/ ( i, i = 1, ndfp ) /) + ndim
end program t

gives 
           1           2           3           4
whereas it should be
           3           4           5           6

Note, that both ndfp and ndim need to be variables not constants, in order to
generate the wrong result.


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

end of thread, other threads:[~2014-08-15 20:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-12  9:34 [Bug fortran/62106] New: Adding a scalar variable to an array constructor gives wrong result m.a.hulsen at tue dot nl
2014-08-12  9:45 ` [Bug fortran/62106] " m.a.hulsen at tue dot nl
2014-08-12 12:52 ` [Bug fortran/62106] [4.9/4.10 Regression] " dominiq at lps dot ens.fr
2014-08-13 19:01 ` [Bug fortran/62106] [4.9/5 " tkoenig at gcc dot gnu.org
2014-08-14 18:52 ` tkoenig at gcc dot gnu.org
2014-08-15 20:48 ` tkoenig at gcc dot gnu.org
2014-08-15 20:48 ` tkoenig 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).