public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37691]  New: Duplicate error messages
@ 2008-10-01 13:01 dominiq at lps dot ens dot fr
  2009-03-29  8:41 ` [Bug fortran/37691] " fxcoudert at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-10-01 13:01 UTC (permalink / raw)
  To: gcc-bugs

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


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

* [Bug fortran/37691] Duplicate error messages
  2008-10-01 13:01 [Bug fortran/37691] New: Duplicate error messages dominiq at lps dot ens dot fr
@ 2009-03-29  8:41 ` fxcoudert at gcc dot gnu dot org
  2009-12-11 22:30 ` dfranke at gcc dot gnu dot org
  2009-12-12  9:33 ` dominiq at lps dot ens dot fr
  2 siblings, 0 replies; 4+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-03-29  8:41 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2009-03-29 08:41:02
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37691


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

* [Bug fortran/37691] Duplicate error messages
  2008-10-01 13:01 [Bug fortran/37691] New: Duplicate error messages dominiq at lps dot ens dot fr
  2009-03-29  8:41 ` [Bug fortran/37691] " fxcoudert at gcc dot gnu dot org
@ 2009-12-11 22:30 ` dfranke at gcc dot gnu dot org
  2009-12-12  9:33 ` dominiq at lps dot ens dot fr
  2 siblings, 0 replies; 4+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-12-11 22:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dfranke at gcc dot gnu dot org  2009-12-11 22:30 -------
I think this one is actually ok. The message is emitted rank-times, once for
each non-integer rank, for each variable. 

Here we get it three times:
  real, parameter :: n = 2
  real, dimension(n) :: x, y, z
end

Here 4*3 = 12 times:
  real, parameter :: n = 2
  real, dimension(n, n, n, n) :: x, y, z
end

Here just once:
  real, parameter :: n = 2
  real :: x, y(n), z
end

Thus, all fine?!


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37691


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

* [Bug fortran/37691] Duplicate error messages
  2008-10-01 13:01 [Bug fortran/37691] New: Duplicate error messages dominiq at lps dot ens dot fr
  2009-03-29  8:41 ` [Bug fortran/37691] " fxcoudert at gcc dot gnu dot org
  2009-12-11 22:30 ` dfranke at gcc dot gnu dot org
@ 2009-12-12  9:33 ` dominiq at lps dot ens dot fr
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-12-12  9:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dominiq at lps dot ens dot fr  2009-12-12 09:33 -------
> Thus, all fine?!

Now I understand the logic. Thanks for the explanation. Closing as invalid.


-- 

dominiq at lps dot ens dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37691


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

end of thread, other threads:[~2009-12-12  9:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-01 13:01 [Bug fortran/37691] New: Duplicate error messages dominiq at lps dot ens dot fr
2009-03-29  8:41 ` [Bug fortran/37691] " fxcoudert at gcc dot gnu dot org
2009-12-11 22:30 ` dfranke at gcc dot gnu dot org
2009-12-12  9:33 ` dominiq at lps dot ens dot fr

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).