public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24759] New: Unclear error message
@ 2005-11-09 17:37 schnetter at aei dot mpg dot de
2005-11-09 17:39 ` [Bug fortran/24759] Unclear error message for a syntax error pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-11-09 17:37 UTC (permalink / raw)
To: gcc-bugs
The code
subroutine a (emask)
implicit none
real, intent(in) :: emask(:,:,:)
logical :: left(3), right(3)
integer :: i,j,k
i=1; j=1; k=1
left=.false.
right=.false.
if (.not.right(3)) left(1) = abs(emask(i,j,k+1)-1)<0.01)
end subroutine a
contains an error in the if statement. The last closing parenthesis in this
line must not be there. When compiled with gfortran, the error message is
$ ~/gcc/bin/gfortran --version
GNU Fortran 95 (GCC) 4.1.0 20051030 (experimental)
$ ~/gcc/bin/gfortran -c unclassifyable.f90
In file unclassifyable.f90:9
if (.not.right(3)) left(1) = abs(emask(i,j,k+1)-1)<0.01)
1
Error: Unclassifiable statement in IF-clause at (1)
This may be technically correct, but I wonder whether it would be possible to
count parentheses and detect the mismatch. I'm aware of the fact that
classifying statements in Fortran requires e.g. looking for equal signs and
commas that are not enclosed in parentheses, so that mismatching parantheses
can throw the classifier off. But the classifier probably already contains
parentheses matching code, and reporting the mismatch would lead to a better
error message.
--
Summary: Unclear error message
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
GCC build triplet: powerpc-apple-darwin8.3.0
GCC host triplet: powerpc-apple-darwin8.3.0
GCC target triplet: powerpc-apple-darwin8.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24759
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/24759] Unclear error message for a syntax error
2005-11-09 17:37 [Bug fortran/24759] New: Unclear error message schnetter at aei dot mpg dot de
@ 2005-11-09 17:39 ` pinskia at gcc dot gnu dot org
2006-01-03 17:04 ` pinskia at gcc dot gnu dot org
2007-12-21 22:17 ` dfranke at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-09 17:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-09 17:39 -------
I notice that we give an unclassifiable error almost any time there is a syntax
error.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2005-11-09 17:39:53
date| |
Summary|Unclear error message |Unclear error message for a
| |syntax error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24759
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/24759] Unclear error message for a syntax error
2005-11-09 17:37 [Bug fortran/24759] New: Unclear error message schnetter at aei dot mpg dot de
2005-11-09 17:39 ` [Bug fortran/24759] Unclear error message for a syntax error pinskia at gcc dot gnu dot org
@ 2006-01-03 17:04 ` pinskia at gcc dot gnu dot org
2007-12-21 22:17 ` dfranke at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-03 17:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-01-03 17:04 -------
Not PPC specific.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|powerpc-apple-darwin8.3.0 |
GCC host triplet|powerpc-apple-darwin8.3.0 |
GCC target triplet|powerpc-apple-darwin8.3.0 |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24759
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/24759] Unclear error message for a syntax error
2005-11-09 17:37 [Bug fortran/24759] New: Unclear error message schnetter at aei dot mpg dot de
2005-11-09 17:39 ` [Bug fortran/24759] Unclear error message for a syntax error pinskia at gcc dot gnu dot org
2006-01-03 17:04 ` pinskia at gcc dot gnu dot org
@ 2007-12-21 22:17 ` dfranke at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-12-21 22:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dfranke at gcc dot gnu dot org 2007-12-21 22:17 -------
Fixed by Jerry. Closing as dupe.
*** This bug has been marked as a duplicate of 34325 ***
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24759
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-12-21 22:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-09 17:37 [Bug fortran/24759] New: Unclear error message schnetter at aei dot mpg dot de
2005-11-09 17:39 ` [Bug fortran/24759] Unclear error message for a syntax error pinskia at gcc dot gnu dot org
2006-01-03 17:04 ` pinskia at gcc dot gnu dot org
2007-12-21 22:17 ` dfranke at gcc dot gnu dot 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).