public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/23151] print (buf, format), expression should be invalid
       [not found] <bug-23151-10391@http.gcc.gnu.org/bugzilla/>
@ 2005-10-07 11:45 ` fxcoudert at gcc dot gnu dot org
  2005-11-02 21:59 ` tkoenig at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-10-07 11:45 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-07 11:45:20
               date|                            |


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


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

* [Bug fortran/23151] print (buf, format), expression should be invalid
       [not found] <bug-23151-10391@http.gcc.gnu.org/bugzilla/>
  2005-10-07 11:45 ` [Bug fortran/23151] print (buf, format), expression should be invalid fxcoudert at gcc dot gnu dot org
@ 2005-11-02 21:59 ` tkoenig at gcc dot gnu dot org
  2006-05-23 20:49 ` tkoenig at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-11-02 21:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tkoenig at gcc dot gnu dot org  2005-11-02 21:59 -------
g77 groks this:

$ cat prt.f
      program main
      character*80 line
      print (line,'(A)'), 'hello'
      end
$ g77 prt.f
prt.f: In program `main':
prt.f:3:
         print (line,'(A)'), 'hello'
                ^
Real part of complex constant at (^) must be a real or integer constant --
otherwise use CMPLX() or COMPLEX() in place of ()
prt.f:3:
         print (line,'(A)'), 'hello'
                     ^
Imaginary part of complex constant at (^) must be a real or integer constant --
otherwise use CMPLX() or COMPLEX() in place of ()


-- 

tkoenig at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19292
              nThis|                            |


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


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

* [Bug fortran/23151] print (buf, format), expression should be invalid
       [not found] <bug-23151-10391@http.gcc.gnu.org/bugzilla/>
  2005-10-07 11:45 ` [Bug fortran/23151] print (buf, format), expression should be invalid fxcoudert at gcc dot gnu dot org
  2005-11-02 21:59 ` tkoenig at gcc dot gnu dot org
@ 2006-05-23 20:49 ` tkoenig at gcc dot gnu dot org
  2006-05-23 21:17 ` tkoenig at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2006-05-23 20:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from tkoenig at gcc dot gnu dot org  2006-05-23 20:48 -------
This patch looks as if it could do the job:

Index: io.c
===================================================================
--- io.c        (revision 113958)
+++ io.c        (working copy)
@@ -2424,6 +2424,12 @@
       dt->io_unit = default_unit (k);
       goto get_io_list;
     }
+  else
+    {
+      /* print (*,*) is invalid.  */
+      if (gfc_match_char ('('))
+       goto syntax;
+    }

   /* Match a control list */
   if (match_dt_element (k, dt) == MATCH_YES)


-- 


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


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

* [Bug fortran/23151] print (buf, format), expression should be invalid
       [not found] <bug-23151-10391@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-05-23 20:49 ` tkoenig at gcc dot gnu dot org
@ 2006-05-23 21:17 ` tkoenig at gcc dot gnu dot org
  2006-05-25 18:55 ` patchapp at dberlin dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2006-05-23 21:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from tkoenig at gcc dot gnu dot org  2006-05-23 21:17 -------
The previous patch was bogus.  This one actually works:

Index: io.c
===================================================================
--- io.c        (revision 113958)
+++ io.c        (working copy)
@@ -2424,6 +2424,12 @@
       dt->io_unit = default_unit (k);
       goto get_io_list;
     }
+  else
+    {
+      /* print (*,*) is invalid.  */
+      if (k == M_PRINT)
+       goto syntax;
+    }

   /* Match a control list */
   if (match_dt_element (k, dt) == MATCH_YES)


-- 


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


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

* [Bug fortran/23151] print (buf, format), expression should be invalid
       [not found] <bug-23151-10391@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2006-05-23 21:17 ` tkoenig at gcc dot gnu dot org
@ 2006-05-25 18:55 ` patchapp at dberlin dot org
  2006-05-25 21:36 ` tkoenig at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: patchapp at dberlin dot org @ 2006-05-25 18:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from patchapp at dberlin dot org  2006-05-25 18:55 -------
Subject: Bug number PR23151

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01323.html


-- 


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


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

* [Bug fortran/23151] print (buf, format), expression should be invalid
       [not found] <bug-23151-10391@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2006-05-25 18:55 ` patchapp at dberlin dot org
@ 2006-05-25 21:36 ` tkoenig at gcc dot gnu dot org
  2006-05-26 19:53 ` tkoenig at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2006-05-25 21:36 UTC (permalink / raw)
  To: gcc-bugs



-- 

tkoenig at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |tkoenig at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-01-08 06:14:40         |2006-05-25 21:36:29
               date|                            |


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


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

* [Bug fortran/23151] print (buf, format), expression should be invalid
       [not found] <bug-23151-10391@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2006-05-25 21:36 ` tkoenig at gcc dot gnu dot org
@ 2006-05-26 19:53 ` tkoenig at gcc dot gnu dot org
  2006-05-31 20:51 ` tkoenig at gcc dot gnu dot org
  2006-05-31 20:51 ` tkoenig at gcc dot gnu dot org
  8 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2006-05-26 19:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from tkoenig at gcc dot gnu dot org  2006-05-26 19:53 -------
Subject: Bug 23151

Author: tkoenig
Date: Fri May 26 19:53:18 2006
New Revision: 114138

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114138
Log:
2006-05-26  Thomas Koenig  <Thomas.Koenig@online.de>

        PR fortran/23151
        * io.c (match_io):  print (1,*) is an error.

2006-05-26  Thomas Koenig  <Thomas.Koenig@online.de>

        PR fortran/23151
        * gfortran.dg/inquire_9.f90:  Fix illegal print syntax.
        * gfortran.dg/print_parentheses_1.f:  New test.
        * gfortran.dg/print_parentheses_2.f90:  New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/print_parentheses_1.f
    trunk/gcc/testsuite/gfortran.dg/print_parentheses_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/io.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/inquire_9.f90


-- 


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


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

* [Bug fortran/23151] print (buf, format), expression should be invalid
       [not found] <bug-23151-10391@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2006-05-31 20:51 ` tkoenig at gcc dot gnu dot org
@ 2006-05-31 20:51 ` tkoenig at gcc dot gnu dot org
  8 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2006-05-31 20:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from tkoenig at gcc dot gnu dot org  2006-05-31 20:51 -------
Fixed on trunk and 4.1.  Closing.


-- 

tkoenig at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/23151] print (buf, format), expression should be invalid
       [not found] <bug-23151-10391@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2006-05-26 19:53 ` tkoenig at gcc dot gnu dot org
@ 2006-05-31 20:51 ` tkoenig at gcc dot gnu dot org
  2006-05-31 20:51 ` tkoenig at gcc dot gnu dot org
  8 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2006-05-31 20:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from tkoenig at gcc dot gnu dot org  2006-05-31 20:51 -------
Subject: Bug 23151

Author: tkoenig
Date: Wed May 31 20:50:34 2006
New Revision: 114281

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114281
Log:
2006-05-31  Thomas Koenig  <Thomas.Koenig@online.de>

        PR fortran/23151
        Backport from mainline.
        * io.c (match_io):  print (1,*) is an error.

2006-05-31  Thomas Koenig  <Thomas.Koenig@online.de>

        PR fortran/23151
        Backport from mainline.
        * gfortran.dg/inquire_9.f90:  Fix illegal print syntax.
        * gfortran.dg/print_parentheses_1.f:  New test.
        * gfortran.dg/print_parentheses_2.f90:  New test.


Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/print_parentheses_1.f
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/print_parentheses_2.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/io.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/inquire_9.f90


-- 


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


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

end of thread, other threads:[~2006-05-31 20:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23151-10391@http.gcc.gnu.org/bugzilla/>
2005-10-07 11:45 ` [Bug fortran/23151] print (buf, format), expression should be invalid fxcoudert at gcc dot gnu dot org
2005-11-02 21:59 ` tkoenig at gcc dot gnu dot org
2006-05-23 20:49 ` tkoenig at gcc dot gnu dot org
2006-05-23 21:17 ` tkoenig at gcc dot gnu dot org
2006-05-25 18:55 ` patchapp at dberlin dot org
2006-05-25 21:36 ` tkoenig at gcc dot gnu dot org
2006-05-26 19:53 ` tkoenig at gcc dot gnu dot org
2006-05-31 20:51 ` tkoenig at gcc dot gnu dot org
2006-05-31 20:51 ` tkoenig 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).