This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37691] New: Duplicate error messages
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Oct 2008 13:00:06 -0000
- Subject: [Bug fortran/37691] New: Duplicate error messages
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Extracted from pr36192, the following code
program three_body
real, parameter :: n = 2, d = 2
! real, dimension(n), parameter :: m = (/ 1.0, 1.0 /)
real, dimension(n,d) :: x, v
! real, dimension(n,d) :: x, v, x_n, v_n, x_hq, v_hq
end program three_body
yields the following errors
pr36192_dup.f90:4.18:
real, dimension(n,d) :: x, v
1
Error: Expression at (1) must be of INTEGER type
pr36192_dup.f90:4.20:
real, dimension(n,d) :: x, v
1
Error: Expression at (1) must be of INTEGER type
pr36192_dup.f90:4.30:
real, dimension(n,d) :: x, v
1
Error: The module or main program array 'v' at (1) must have constant shape
pr36192_dup.f90:4.18:
real, dimension(n,d) :: x, v
1
Error: Expression at (1) must be of INTEGER type
pr36192_dup.f90:4.20:
real, dimension(n,d) :: x, v
1
Error: Expression at (1) must be of INTEGER type
pr36192_dup.f90:4.27:
real, dimension(n,d) :: x, v
1
Error: The module or main program array 'x' at (1) must have constant shape
where the messages "Expression at (1) must be of INTEGER type" are emitted
twice.
If the x_n, v_n, x_hq, v_hq arrays are added, these messages are emitted six
times, as if they were delayed until the messages "The module or main program
array 'v' at (1) must have constant shape" are emiited. I don't know why the
"INTEGER type" error was delayed, but emitting it when it is first encountered
should solve the problem.
Note that in the patch http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01755.html
submitted by Daniel kraft, all the "Expression at (1) must be of INTEGER type"
errors were removed, making difficult to locate the primary cause of the errors
(n and d declared as real).
--
Summary: Duplicate error messages
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37691