public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30874] New: incorrect error message for valid code
@ 2007-02-20 7:51 jv244 at cam dot ac dot uk
2007-02-20 10:43 ` [Bug fortran/30874] " dominiq at lps dot ens dot fr
2007-02-20 13:54 ` burnus at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-02-20 7:51 UTC (permalink / raw)
To: gcc-bugs
With recent trunk, gfortran incorrectly generates an error for the following
standard code:
program forall_9
real, dimension (5, 5, 5, 5) :: a, b, c, d
a (:, :, :, :) = 4
forall (i = 1:5)
a (i, i, 6 - i, i) = 7
end forall
forall (i = 1:5)
a (i, 6 - i, i, i) = 7
end forall
forall (i = 1:5)
a (6 - i, i, i, i) = 7
end forall
forall (i = 1:5:2)
a (1, 2, 3, i) = 0
end forall
b = a
c = a
d = a
forall (i = 1:5, j = 1:5, k = 1:5, any (a (i, j, k, :) .gt. 6))
forall (l = 1:5, any (a (:, :, :, l) .lt. 2))
a (i, j, k, l) = i - j + k - l + 0.5
end forall
end forall
forall (l = 1:5, any (b (:, :, :, l) .lt. 2))
forall (i = 1:5, j = 1:5, k = 1:5, any (b (i, j, k, :) .gt. 6))
b (i, j, k, l) = i - j + k - l + 0.5
end forall
end forall
forall (i = 1:5, j = 1:5, k = 1:5, any (c (i, j, k, :) .gt. 6))
forall (l = 1:5, any (c (:, :, :, l) .lt. 2))
c (i, j, k, l) = i - j + k - l + 0.5 + c (l, k, j, i)
end forall
end forall
forall (l = 1:5, any (d (:, :, :, l) .lt. 2))
forall (i = 1:5, j = 1:5, k = 1:5, any (d (i, j, k, :) .gt. 6))
d (i, j, k, l) = i - j + k - l + 0.5 + d (l, k, j, i)
end forall
end forall
do i = 1, 5
do j = 1, 5
do k = 1, 5
do l = 1, 5
r = 4
if ((i == j .and. k == 6 - i) .or. (i == k .and. j == 6 - i)) then
if (l /= 2 .and. l /= 4) then
r = 1
elseif (l == i) then
r = 7
end if
elseif (j == k .and. i == 6 - j) then
if (l /= 2 .and. l /= 4) then
r = 1
elseif (l == j) then
r = 7
end if
elseif (i == 1 .and. j == 2 .and. k == 3 .and. l /= 2 .and. l /= 4)
then
r = 0
end if
s = r
if (r == 1) then
r = i - j + k - l + 0.5
if (((l == k .and. j == 6 - l) .or. (l == j .and. k == 6 - l))
.and. (i == l)) then
s = r + 7
elseif (k == j .and. l == 6 - k .and. i == k) then
s = r + 7
elseif (l /= 1 .or. k /= 2 .or. j /= 3 .or. i == 2 .or. i == 4)
then
s = r + 4
else
s = r
end if
end if
if (a (i, j, k, l) /= r) call abort ()
if (c (i, j, k, l) /= s) call abort ()
end do
end do
end do
end do
if (any (a /= b .or. c /= d)) call abort ()
end
--
Summary: incorrect error message for valid code
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30874
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/30874] incorrect error message for valid code
2007-02-20 7:51 [Bug fortran/30874] New: incorrect error message for valid code jv244 at cam dot ac dot uk
@ 2007-02-20 10:43 ` dominiq at lps dot ens dot fr
2007-02-20 13:54 ` burnus at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens dot fr @ 2007-02-20 10:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dominiq at lps dot ens dot fr 2007-02-20 10:42 -------
Works for me with: Target: powerpc-apple-darwin7, gcc version 4.3.0 20070216,
plus patch for PR #30400.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30874
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/30874] incorrect error message for valid code
2007-02-20 7:51 [Bug fortran/30874] New: incorrect error message for valid code jv244 at cam dot ac dot uk
2007-02-20 10:43 ` [Bug fortran/30874] " dominiq at lps dot ens dot fr
@ 2007-02-20 13:54 ` burnus at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-20 13:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2007-02-20 13:54 -------
Works also for me on x86_64-unknown-linux-gnu with
4.3.0 20070220.
If it still occurs, please reopen and state the error message and the compiler
version/platform.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |RESOLVED
Resolution| |WORKSFORME
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30874
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-20 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-20 7:51 [Bug fortran/30874] New: incorrect error message for valid code jv244 at cam dot ac dot uk
2007-02-20 10:43 ` [Bug fortran/30874] " dominiq at lps dot ens dot fr
2007-02-20 13:54 ` burnus at gcc dot gnu dot 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).