public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18993] New: gfortran fails to recognise comment line.
@ 2004-12-14 18:28 tow21 at cam dot ac dot uk
  2004-12-14 18:34 ` [Bug fortran/18993] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: tow21 at cam dot ac dot uk @ 2004-12-14 18:28 UTC (permalink / raw)
  To: gcc-bugs

With the attached code, gfortran fails to understand that the second comment 
is a comment, and complains about an unclassified statement. 
 
parabrisas% gfortran -c bug5.F  
 In file bug5.F:5 
 
C Set default sizes for order N arrays                                          
1 
Error: Non-numeric character in statement label at (1) 
 In file bug5.F:5 
 
C Set default sizes for order N arrays                                          
1 
Error: Unclassifiable statement at (1) 
 
parabrisas% cat bug5.F 
      subroutine ordern( ) 
      real, pointer :: aux(:,:) 
C Nullify pointers 
        nullify(aux) 
C Set default sizes for order N arrays 
      end subroutine ordern

-- 
           Summary: gfortran fails to recognise comment line.
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tow21 at cam dot ac dot uk
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug fortran/18993] gfortran fails to recognise comment line.
  2004-12-14 18:28 [Bug fortran/18993] New: gfortran fails to recognise comment line tow21 at cam dot ac dot uk
@ 2004-12-14 18:34 ` pinskia at gcc dot gnu dot org
  2004-12-14 22:24 ` tobi at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-14 18:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-14 18:34 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-14 18:34:09
               date|                            |


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


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

* [Bug fortran/18993] gfortran fails to recognise comment line.
  2004-12-14 18:28 [Bug fortran/18993] New: gfortran fails to recognise comment line tow21 at cam dot ac dot uk
  2004-12-14 18:34 ` [Bug fortran/18993] " pinskia at gcc dot gnu dot org
@ 2004-12-14 22:24 ` tobi at gcc dot gnu dot org
  2004-12-15 17:37 ` [Bug fortran/18993] incorrect parsing in fixed-form tobi at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-12-14 22:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-12-14 22:24 -------
This is unrelated to preprocessing (changing the extension to .f doesn't solve
the problem). Changing 'C' to '!' fixes the problem.

It looks like the scanner is mistaken about the column count.

-- 


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


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

* [Bug fortran/18993] incorrect parsing in fixed-form
  2004-12-14 18:28 [Bug fortran/18993] New: gfortran fails to recognise comment line tow21 at cam dot ac dot uk
  2004-12-14 18:34 ` [Bug fortran/18993] " pinskia at gcc dot gnu dot org
  2004-12-14 22:24 ` tobi at gcc dot gnu dot org
@ 2004-12-15 17:37 ` tobi at gcc dot gnu dot org
  2004-12-15 18:03 ` tobi at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-12-15 17:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-12-15 17:33 -------
This is much worse than it seems. The problem is in statement matching, e.g. we
accept this, as if there was a semicolon on the indicated line:
      subroutine ordern( ) 
      real, pointer :: aux(:,:) 
C Nullify pointers 
        nullify(aux) i = i + 1 !<------ SYNTAX ERROR
C Set default sizes for order N arrays 
      end subroutine ordern

the problem is that we don't match the end of statement correctly. I have a
patch which addresses this case, but this problem will quite probably affect
other statements as well, so I'm looking into those first.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tobi at gcc dot gnu dot org
           Severity|normal                      |critical
           Keywords|                            |accepts-invalid
            Summary|gfortran fails to recognise |incorrect parsing in fixed-
                   |comment line.               |form


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


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

* [Bug fortran/18993] incorrect parsing in fixed-form
  2004-12-14 18:28 [Bug fortran/18993] New: gfortran fails to recognise comment line tow21 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2004-12-15 17:37 ` [Bug fortran/18993] incorrect parsing in fixed-form tobi at gcc dot gnu dot org
@ 2004-12-15 18:03 ` tobi at gcc dot gnu dot org
  2004-12-15 18:56 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-12-15 18:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-12-15 18:03 -------
Patch here: http://gcc.gnu.org/ml/fortran/2004-12/msg00161.html

After visual inspection of the statement matchers this problem only seems to
affect gfc_match_nullify.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch
   Last reconfirmed|2004-12-14 18:34:09         |2004-12-15 18:03:41
               date|                            |


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


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

* [Bug fortran/18993] incorrect parsing in fixed-form
  2004-12-14 18:28 [Bug fortran/18993] New: gfortran fails to recognise comment line tow21 at cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2004-12-15 18:56 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-15 18:56 ` tobi at gcc dot gnu dot org
  2004-12-15 19:01 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-12-15 18:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-12-15 18:56 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/18993] incorrect parsing in fixed-form
  2004-12-14 18:28 [Bug fortran/18993] New: gfortran fails to recognise comment line tow21 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2004-12-15 18:03 ` tobi at gcc dot gnu dot org
@ 2004-12-15 18:56 ` cvs-commit at gcc dot gnu dot org
  2004-12-15 18:56 ` tobi at gcc dot gnu dot org
  2004-12-15 19:01 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-15 18:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-15 18:56 -------
Subject: Bug 18993

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-12-15 18:55:57

Modified files:
	gcc/fortran    : ChangeLog match.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: nullify_1.f 

Log message:
	fortran/
	PR fortran/18993
	* match.c (gfc_match_if): Don't explicitly skip optional whitespace.
	(gfc_match_nullify): Make sure that ')' is in front of the end of
	statement.
	
	testsuite/
	PR fortran/18993
	* gfotran.dg/nullify_1.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.273&r2=1.274
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&r1=1.26&r2=1.27
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4765&r2=1.4766
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/nullify_1.f.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug fortran/18993] incorrect parsing in fixed-form
  2004-12-14 18:28 [Bug fortran/18993] New: gfortran fails to recognise comment line tow21 at cam dot ac dot uk
                   ` (5 preceding siblings ...)
  2004-12-15 18:56 ` tobi at gcc dot gnu dot org
@ 2004-12-15 19:01 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-15 19:01 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2004-12-15 19:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-14 18:28 [Bug fortran/18993] New: gfortran fails to recognise comment line tow21 at cam dot ac dot uk
2004-12-14 18:34 ` [Bug fortran/18993] " pinskia at gcc dot gnu dot org
2004-12-14 22:24 ` tobi at gcc dot gnu dot org
2004-12-15 17:37 ` [Bug fortran/18993] incorrect parsing in fixed-form tobi at gcc dot gnu dot org
2004-12-15 18:03 ` tobi at gcc dot gnu dot org
2004-12-15 18:56 ` cvs-commit at gcc dot gnu dot org
2004-12-15 18:56 ` tobi at gcc dot gnu dot org
2004-12-15 19:01 ` pinskia 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).