public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52325] New: unclear error: Unclassifiable statement
@ 2012-02-21 10:39 kloedej at knmi dot nl
  2012-02-21 11:09 ` [Bug fortran/52325] " burnus at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: kloedej at knmi dot nl @ 2012-02-21 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52325
           Summary: unclear error: Unclassifiable statement
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kloedej@knmi.nl


The given example code generates this error:

   unclassifiable.F90:9.4:

       cc%a = 1
       1
   Error: Unclassifiable statement at (1)


while in fact it would be much more helpfull if the error would clearly state
that the symbol is not yet defined (as the commented out lines do):

   unclassifiable.F90:16.5:
       d=1
        1
   Error: Symbol 'd' at (1) has no IMPLICIT type

Especially in larger modules/programs having a clear error in case of this kind
of variable naming msitakes/typos could save a lot of debugging time for
gfortran users.

Example code:

module test_unclassifiable
  implicit none
  type test
     integer :: a
  end type test
contains
  subroutine test_sub1(c)
    type(test), intent(out) :: c
    cc%a = 1
  end subroutine test_sub1
!  subroutine test_sub2(c)
!    integer :: c
!    d=1
!  end subroutine test_sub2
end module test_unclassifiable


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

end of thread, other threads:[~2012-03-02 15:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-21 10:39 [Bug fortran/52325] New: unclear error: Unclassifiable statement kloedej at knmi dot nl
2012-02-21 11:09 ` [Bug fortran/52325] " burnus at gcc dot gnu.org
2012-02-21 16:43 ` burnus at gcc dot gnu.org
2012-02-22  6:52 ` Joost.VandeVondele at mat dot ethz.ch
2012-02-22  7:05 ` Joost.VandeVondele at mat dot ethz.ch
2012-03-02 13:21 ` burnus at gcc dot gnu.org
2012-03-02 13:37 ` burnus at gcc dot gnu.org
2012-03-02 13:51 ` kloedej at knmi dot nl
2012-03-02 15:01 ` burnus 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).