From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25909 invoked by alias); 31 Aug 2011 14:15:08 -0000 Received: (qmail 25834 invoked by uid 22791); 31 Aug 2011 14:15:06 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,SARE_SUB_PCT_LETTER X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 31 Aug 2011 14:14:54 +0000 From: "arjen.markus895 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/50252] New: Error message on "call x%y" (x not declared) can be more informative Date: Wed, 31 Aug 2011 14:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: arjen.markus895 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg02556.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50252 Bug #: 50252 Summary: Error message on "call x%y" (x not declared) can be more informative Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: arjen.markus895@gmail.com If you forget to declare a variable with type-bound procedures, say x, and call one of the intended procedures anyway, the message is simply that there was a syntax error. The program: program test123 call bb%print end program test123 results in the following error message: xx.f90:3.11: call x%print 1 Error: Syntax error in CALL statement at (1) This message could be made clearer by pointing out that a variable may not be declared - if the statement contains a %: Error: Syntax error in CALL statement at (1). Possibly a variable has not been declared.