public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41154]  New: [4.5 Regression] Comma required after P descriptor
@ 2009-08-24 12:26 janus at gcc dot gnu dot org
  2009-08-24 13:46 ` [Bug fortran/41154] " burnus at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-08-24 12:26 UTC (permalink / raw)
  To: gcc-bugs

With r151053 I get an error when I compile the following line:

2000 format (1X,1P,E14.6,3E12.4,0P)
                                   1
Error: Comma required after P descriptor in format string at (1)

While I haven't checked in the standard if this is really valid, it was
swallowed by gfortran until recently. It is also accepted by ifort and g95.

This was certainly introduced by Jerry's r151045.


-- 
           Summary: [4.5 Regression] Comma required after P descriptor
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janus at gcc dot gnu dot org


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


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

* [Bug fortran/41154] [4.5 Regression] Comma required after P descriptor
  2009-08-24 12:26 [Bug fortran/41154] New: [4.5 Regression] Comma required after P descriptor janus at gcc dot gnu dot org
@ 2009-08-24 13:46 ` burnus at gcc dot gnu dot org
  2009-08-24 13:55 ` janus at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-24 13:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2009-08-24 13:45 -------
> With r151053 I get an error when I compile the following line:
> 2000 format (1X,1P,E14.6,3E12.4,0P)
>                                    1
> Error: Comma required after P descriptor in format string at (1)

That looks like a bug: There is surely no comma required at the end of the
format/before a ')'. Seemingly, we missed that special case. The check is
correct for fmt strings such as  '(1P2E12.4)'.

However, I cannot reproduce the problem with a program consisting only of:

2000 format (1X,1P,E14.6,3E12.4,0P)
end

In PR 41152, it was also depending on other lines. Can you re-check?


> This was certainly introduced by Jerry's r151045.

See also PR 35754.


-- 


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


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

* [Bug fortran/41154] [4.5 Regression] Comma required after P descriptor
  2009-08-24 12:26 [Bug fortran/41154] New: [4.5 Regression] Comma required after P descriptor janus at gcc dot gnu dot org
  2009-08-24 13:46 ` [Bug fortran/41154] " burnus at gcc dot gnu dot org
@ 2009-08-24 13:55 ` janus at gcc dot gnu dot org
  2009-08-24 23:45 ` jvdelisle at verizon dot net
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-08-24 13:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from janus at gcc dot gnu dot org  2009-08-24 13:55 -------

> However, I cannot reproduce the problem with a program consisting only of:
> 
> 2000 format (1X,1P,E14.6,3E12.4,0P)
> end

Hm, funny. For me the error *does* appear already for this two-liner (at
r151053).


-- 


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


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

* [Bug fortran/41154] [4.5 Regression] Comma required after P descriptor
  2009-08-24 12:26 [Bug fortran/41154] New: [4.5 Regression] Comma required after P descriptor janus at gcc dot gnu dot org
  2009-08-24 13:46 ` [Bug fortran/41154] " burnus at gcc dot gnu dot org
  2009-08-24 13:55 ` janus at gcc dot gnu dot org
@ 2009-08-24 23:45 ` jvdelisle at verizon dot net
  2009-08-24 23:45 ` [Bug fortran/41154] New: " Jerry DeLisle
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at verizon dot net @ 2009-08-24 23:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jvdelisle at verizon dot net  2009-08-24 23:45 -------
Subject: Re:   New: [4.5 Regression] Comma required after P
 descriptor

On 08/24/2009 05:26 AM, janus at gcc dot gnu dot org wrote:
> With r151053 I get an error when I compile the following line:
>
> 2000 format (1X,1P,E14.6,3E12.4,0P)
>                                     1
> Error: Comma required after P descriptor in format string at (1)
>
> While I haven't checked in the standard if this is really valid, it was
> swallowed by gfortran until recently. It is also accepted by ifort and g95.
>
> This was certainly introduced by Jerry's r151045.
>
>
Thats my fault, will fix shortly.

Jerry


-- 


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


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

* Re: [Bug fortran/41154]  New: [4.5 Regression] Comma required after P  descriptor
  2009-08-24 12:26 [Bug fortran/41154] New: [4.5 Regression] Comma required after P descriptor janus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-08-24 23:45 ` jvdelisle at verizon dot net
@ 2009-08-24 23:45 ` Jerry DeLisle
  2009-08-25  1:03 ` [Bug fortran/41154] " jvdelisle at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jerry DeLisle @ 2009-08-24 23:45 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

On 08/24/2009 05:26 AM, janus at gcc dot gnu dot org wrote:
> With r151053 I get an error when I compile the following line:
>
> 2000 format (1X,1P,E14.6,3E12.4,0P)
>                                     1
> Error: Comma required after P descriptor in format string at (1)
>
> While I haven't checked in the standard if this is really valid, it was
> swallowed by gfortran until recently. It is also accepted by ifort and g95.
>
> This was certainly introduced by Jerry's r151045.
>
>
Thats my fault, will fix shortly.

Jerry


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

* [Bug fortran/41154] [4.5 Regression] Comma required after P descriptor
  2009-08-24 12:26 [Bug fortran/41154] New: [4.5 Regression] Comma required after P descriptor janus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-08-24 23:45 ` [Bug fortran/41154] New: " Jerry DeLisle
@ 2009-08-25  1:03 ` jvdelisle at gcc dot gnu dot org
  2009-08-25  1:05 ` jvdelisle at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-25  1:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jvdelisle at gcc dot gnu dot org  2009-08-25 01:03 -------
Patch is simple and obvious.  I will commit shortly.

Index: io.c
===================================================================
--- io.c        (revision 151045)
+++ io.c        (working copy)
@@ -694,7 +694,7 @@
        goto fail;
       if (gfc_option.allow_std < GFC_STD_F2003 && t != FMT_COMMA
          && t != FMT_F && t != FMT_E && t != FMT_EN && t != FMT_ES
-         && t != FMT_D && t != FMT_G)
+         && t != FMT_D && t != FMT_G && t != FMT_RPAREN)
        {
          error = _("Comma required after P descriptor");
          goto syntax;
@@ -708,7 +708,7 @@
                goto fail;
            }
           if (t != FMT_F && t != FMT_E && t != FMT_EN && t != FMT_ES && t !=
FMT_D
-             && t != FMT_G)
+             && t != FMT_G && t != FMT_RPAREN)
            {
              error = _("Comma required after P descriptor");
              goto syntax;


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jvdelisle at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-25 01:03:20
               date|                            |


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


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

* [Bug fortran/41154] [4.5 Regression] Comma required after P descriptor
  2009-08-24 12:26 [Bug fortran/41154] New: [4.5 Regression] Comma required after P descriptor janus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-08-25  1:03 ` [Bug fortran/41154] " jvdelisle at gcc dot gnu dot org
@ 2009-08-25  1:05 ` jvdelisle at gcc dot gnu dot org
  2009-08-25  1:14 ` jvdelisle at gcc dot gnu dot org
  2009-08-25  1:21 ` jvdelisle at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-25  1:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jvdelisle at gcc dot gnu dot org  2009-08-25 01:05 -------
Subject: Bug 41154

Author: jvdelisle
Date: Tue Aug 25 01:05:11 2009
New Revision: 151070

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151070
Log:
2009-08-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/41154
        * io.c (check_format): Fix to not error on right paren after P.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/io.c


-- 


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


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

* [Bug fortran/41154] [4.5 Regression] Comma required after P descriptor
  2009-08-24 12:26 [Bug fortran/41154] New: [4.5 Regression] Comma required after P descriptor janus at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-08-25  1:05 ` jvdelisle at gcc dot gnu dot org
@ 2009-08-25  1:14 ` jvdelisle at gcc dot gnu dot org
  2009-08-25  1:21 ` jvdelisle at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-25  1:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jvdelisle at gcc dot gnu dot org  2009-08-25 01:14 -------
Subject: Bug 41154

Author: jvdelisle
Date: Tue Aug 25 01:14:13 2009
New Revision: 151071

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151071
Log:
2009-08-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/41154
        * gfortran.dg/fmt_error_8.f: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/fmt_error_8.f
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/41154] [4.5 Regression] Comma required after P descriptor
  2009-08-24 12:26 [Bug fortran/41154] New: [4.5 Regression] Comma required after P descriptor janus at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-08-25  1:14 ` jvdelisle at gcc dot gnu dot org
@ 2009-08-25  1:21 ` jvdelisle at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-25  1:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jvdelisle at gcc dot gnu dot org  2009-08-25 01:21 -------
Closing.  By all means let me know if anything else crops up.  Thanks for
catching this.


-- 

jvdelisle at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2009-08-25  1:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-24 12:26 [Bug fortran/41154] New: [4.5 Regression] Comma required after P descriptor janus at gcc dot gnu dot org
2009-08-24 13:46 ` [Bug fortran/41154] " burnus at gcc dot gnu dot org
2009-08-24 13:55 ` janus at gcc dot gnu dot org
2009-08-24 23:45 ` jvdelisle at verizon dot net
2009-08-24 23:45 ` [Bug fortran/41154] New: " Jerry DeLisle
2009-08-25  1:03 ` [Bug fortran/41154] " jvdelisle at gcc dot gnu dot org
2009-08-25  1:05 ` jvdelisle at gcc dot gnu dot org
2009-08-25  1:14 ` jvdelisle at gcc dot gnu dot org
2009-08-25  1:21 ` jvdelisle 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).