public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran
@ 2005-08-31 19:42 uttamp at us dot ibm dot com
  2005-08-31 19:51 ` [Bug fortran/23661] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: uttamp at us dot ibm dot com @ 2005-08-31 19:42 UTC (permalink / raw)
  To: gcc-bugs

test case:
$ cat print_fmt.f95
PROGRAM print_fmt_test
IMPLICIT NONE
character(len=5)  :: fmt = "(  a)"
integer        :: i
        print fmt, ("=", i=1, 2)
END PROGRAM print_fmt_test

$ gfortran -c print_fmt.f95
 In file print_fmt.f95:5

 print     fmt, ("=", i=1, 2)
1
Error: Unclassifiable statement at (1)

$ gfortran -v
Using built-in specs.
Target: powerpc64-linux
Configured with: /home/gccbuild/gcc_mline_anoncvs/gcc/configure
--prefix=/opt/gcc-nightly/mline-20050823 --build=powerpc64-linux
--host=powerpc64-linux --target=powerpc64-linux --with-cpu=default32
--with-as=/opt/gcc-nightly/mline-20050823/bin/as
--with-ld=/opt/gcc-nightly/mline-20050823/bin/ld --enable-threads=posix
--enable-shared --enable-__cxa_atexit
--enable-languages=c,c++,f95,java,objc,obj-c++ --enable-checking
--with-mpfr=/opt/gcc-nightly/mline-20050823
Thread model: posix
gcc version 4.1.0 20050823 (experimental)


"print fmt" statement is part of fortran 95 standard.

-- 
           Summary: 'print fmt' is unclassifiable statement in gfortran
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: uttamp at us dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc64-linux
  GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux


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


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

* [Bug fortran/23661] 'print fmt' is unclassifiable statement in gfortran
  2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
@ 2005-08-31 19:51 ` pinskia at gcc dot gnu dot org
  2005-08-31 23:11 ` tobi at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-31 19:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-31 19:49 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
  GCC build triplet|powerpc64-linux             |
   GCC host triplet|powerpc64-linux             |
 GCC target triplet|powerpc64-linux             |
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-31 19:49:03
               date|                            |


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


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

* [Bug fortran/23661] 'print fmt' is unclassifiable statement in gfortran
  2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
  2005-08-31 19:51 ` [Bug fortran/23661] " pinskia at gcc dot gnu dot org
@ 2005-08-31 23:11 ` tobi at gcc dot gnu dot org
  2005-08-31 23:34 ` tobi at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-08-31 23:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-08-31 23:10 -------
What happens is this:

In match_io we have the following code
  if (gfc_match_char ('(') == MATCH_NO)
    {
      /* Treat the non-standard case of PRINT namelist.  */
       if (k == M_PRINT && (gfc_match_name (name) == MATCH_YES)
	    && !gfc_find_symbol (name, NULL, 1, &sym)
	    && (sym->attr.flavor == FL_NAMELIST))
This of course doesn't back up correctly in the case where a name is matched
which is not a namelist, then chaos ensues leading to the error you observed.

Since I approved the patch for this, I take it as may responsibility to fix this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu dot org
         AssignedTo|unassigned at gcc dot gnu   |tobi at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-08-31 19:49:03         |2005-08-31 23:10:30
               date|                            |


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


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

* [Bug fortran/23661] 'print fmt' is unclassifiable statement in gfortran
  2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
  2005-08-31 19:51 ` [Bug fortran/23661] " pinskia at gcc dot gnu dot org
  2005-08-31 23:11 ` tobi at gcc dot gnu dot org
@ 2005-08-31 23:34 ` tobi at gcc dot gnu dot org
  2005-09-01 12:10 ` tobi at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-08-31 23:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-08-31 23:11 -------
(I understood this between my mail to the list, and writing the previous
comment, in case you're wondering about the discrepancy :-)

-- 


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


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

* [Bug fortran/23661] 'print fmt' is unclassifiable statement in gfortran
  2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
                   ` (2 preceding siblings ...)
  2005-08-31 23:34 ` tobi at gcc dot gnu dot org
@ 2005-09-01 12:10 ` tobi at gcc dot gnu dot org
  2005-09-01 12:16 ` fxcoudert at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-09-01 12:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-09-01 12:10 -------
Turns out FX approved the culprit patch :-) Anyway, I'm testing a fix.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |coudert at clipper dot ens
                   |                            |dot fr


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


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

* [Bug fortran/23661] 'print fmt' is unclassifiable statement in gfortran
  2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
                   ` (3 preceding siblings ...)
  2005-09-01 12:10 ` tobi at gcc dot gnu dot org
@ 2005-09-01 12:16 ` fxcoudert at gcc dot gnu dot org
  2005-09-01 14:41 ` tobi at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-09-01 12:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-09-01 12:16 -------
Oops. Would that be Paul T's patch to have "PRINT namelist" work?

Thanks Tobi for the fix!

-- 


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


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

* [Bug fortran/23661] 'print fmt' is unclassifiable statement in gfortran
  2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
                   ` (4 preceding siblings ...)
  2005-09-01 12:16 ` fxcoudert at gcc dot gnu dot org
@ 2005-09-01 14:41 ` tobi at gcc dot gnu dot org
  2005-09-04 12:09 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-09-01 14:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-09-01 14:40 -------
For the record: I accidentallz attached an old version of the third testcase
which doesn't yet have the correct dg-annotations: the first dg-error should be
removed, the second turned into a dg-warning.

-- 


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


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

* [Bug fortran/23661] 'print fmt' is unclassifiable statement in gfortran
  2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
                   ` (5 preceding siblings ...)
  2005-09-01 14:41 ` tobi at gcc dot gnu dot org
@ 2005-09-04 12:09 ` cvs-commit at gcc dot gnu dot org
  2005-09-04 12:26 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-04 12:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-04 12:09 -------
Subject: Bug 23661

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2005-09-04 12:08:53

Modified files:
	gcc/fortran    : ChangeLog io.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: print_fmt_1.f90 print_fmt_2.f90 
	                           print_fmt_3.f 

Log message:
	fortran/
	PR fortran/23661
	* io.c (match_io): Correctly backup if PRINT followed by
	symbol which is not a namelist.  Force blank between PRINT
	and namelist in free form.
	testsuite/
	PR fortran/23661
	* gfortran.dg/print_fmt_1.f90, gfortran.dg/print_fmt_2.f90
	gfortran.dg/print_fmt_3.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.535&r2=1.536
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/io.c.diff?cvsroot=gcc&r1=1.30&r2=1.31
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6002&r2=1.6003
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/print_fmt_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/print_fmt_2.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/print_fmt_3.f.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug fortran/23661] 'print fmt' is unclassifiable statement in gfortran
  2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
                   ` (6 preceding siblings ...)
  2005-09-04 12:09 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-04 12:26 ` cvs-commit at gcc dot gnu dot org
  2005-09-04 12:29 ` tobi at gcc dot gnu dot org
  2005-09-07 14:11 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-04 12:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-04 12:26 -------
Subject: Bug 23661

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	tobi@gcc.gnu.org	2005-09-04 12:25:46

Modified files:
	gcc/fortran    : ChangeLog io.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: print_fmt_1.f90 print_fmt_2.f90 
	                           print_fmt_3.f 

Log message:
	fortran/
	PR fortran/23661
	* io.c (match_io): Correctly backup if PRINT followed by
	symbol which is not a namelist.  Force blank between PRINT
	and namelist in free form.
	
	testsuite/
	PR fortran/23661
	* gfortran.dg/print_fmt_1.f90, gfortran.dg/print_fmt_2.f90
	gfortran.dg/print_fmt_3.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.111&r2=1.335.2.112
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/io.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.19.10.9&r2=1.19.10.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.373&r2=1.5084.2.374
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/print_fmt_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/print_fmt_2.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/print_fmt_3.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug fortran/23661] 'print fmt' is unclassifiable statement in gfortran
  2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
                   ` (7 preceding siblings ...)
  2005-09-04 12:26 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-04 12:29 ` tobi at gcc dot gnu dot org
  2005-09-07 14:11 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-09-04 12:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-09-04 12:29 -------
Fixed.

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


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


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

* [Bug fortran/23661] 'print fmt' is unclassifiable statement in gfortran
  2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
                   ` (8 preceding siblings ...)
  2005-09-04 12:29 ` tobi at gcc dot gnu dot org
@ 2005-09-07 14:11 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-07 14:11 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.2


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


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

end of thread, other threads:[~2005-09-07 14:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-31 19:42 [Bug fortran/23661] New: 'print fmt' is unclassifiable statement in gfortran uttamp at us dot ibm dot com
2005-08-31 19:51 ` [Bug fortran/23661] " pinskia at gcc dot gnu dot org
2005-08-31 23:11 ` tobi at gcc dot gnu dot org
2005-08-31 23:34 ` tobi at gcc dot gnu dot org
2005-09-01 12:10 ` tobi at gcc dot gnu dot org
2005-09-01 12:16 ` fxcoudert at gcc dot gnu dot org
2005-09-01 14:41 ` tobi at gcc dot gnu dot org
2005-09-04 12:09 ` cvs-commit at gcc dot gnu dot org
2005-09-04 12:26 ` cvs-commit at gcc dot gnu dot org
2005-09-04 12:29 ` tobi at gcc dot gnu dot org
2005-09-07 14:11 ` 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).