From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1457 invoked by alias); 4 Jun 2012 17:52:34 -0000 Received: (qmail 1430 invoked by uid 22791); 4 Jun 2012 17:52:32 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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; Mon, 04 Jun 2012 17:52:19 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/53576] New: Very unhelpful error message: "Unclassifiable statement" instead of "Can't convert TYPE to ..." Date: Mon, 04 Jun 2012 17:52: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: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org 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: 2012-06/txt/msg00194.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53576 Bug #: 53576 Summary: Very unhelpful error message: "Unclassifiable statement" instead of "Can't convert TYPE to ..." Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: burnus@gcc.gnu.org The following program is invalid; gfortran rejects it, but with a completely unhelpful error message. The problem is that the "amn(jj)" should be "amn%value(jj). Current error message: wfn & 1 Error: Unclassifiable statement at (1) Expected error (or something similar): = amn(jj) 1 Error: Can't convert TYPE(amn_t) to COMPLEX(4) at (1) Note: gfortran prints the proper error message if the loop bound is changed from "amn%nsites" to, e.g., "5". (That's how I got the type-conversion error message.) program simple_wf_op_gen type :: amn_t integer :: nsites = 0 complex :: value(1) end type amn_t type(amn_t) :: amn integer :: jj complex :: wfn do jj = 1, amn%nsites wfn & = amn(jj) end do end program simple_wf_op_gen