public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54679] New: Erroneous "Expected P edit descriptor" in conjunction with L descriptor
@ 2012-09-23 12:04 nmm1 at cam dot ac.uk
  2012-09-23 12:19 ` [Bug fortran/54679] " nmm1 at cam dot ac.uk
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: nmm1 at cam dot ac.uk @ 2012-09-23 12:04 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54679
           Summary: Erroneous "Expected P edit descriptor" in conjunction
                    with L descriptor
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: nmm1@cam.ac.uk


I get a spurious "Expected P edit descriptor in format string" in
conjunction with the L0 descriptor in a non-trivial format.  Changing
the L0 to I0 or F0.0 works.  It MAY be environment dependent, as I have
also failed to see it in another test program.  The oprogram is not
worth attaching.

PROGRAM Main
    IMPLICIT NONE
    CHARACTER(LEN=*), PARAMETER ::    &
        format1 = "(A,1X,I2,1X,A,1X,I2,1X,A,2(1X,I0,1X),A,2(1X,I0,1X))",    &
        format2 = "(A,1X,I2,1X,A,1X,I2,1X,A,2(1X,I0,1X),A,2(1X,L0,1X))",    &
        format3 = "(A,1X,I2,1X,A,1X,I2,1X,A,2(1X,I0,1X),A,2(1X,F0.0,1X))"
    PRINT format1
    PRINT format2
    PRINT format3
END PROGRAM Main

gives:

junk.f90:8.55:

    PRINT format2
                                                       1
Error: Expected P edit descriptor in format string at (1)


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

* [Bug fortran/54679] Erroneous "Expected P edit descriptor" in conjunction with L descriptor
  2012-09-23 12:04 [Bug fortran/54679] New: Erroneous "Expected P edit descriptor" in conjunction with L descriptor nmm1 at cam dot ac.uk
@ 2012-09-23 12:19 ` nmm1 at cam dot ac.uk
  2012-09-23 16:24 ` kargl at gcc dot gnu.org
  2013-06-27  9:21 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: nmm1 at cam dot ac.uk @ 2012-09-23 12:19 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Nick Maclaren <nmm1 at cam dot ac.uk> 2012-09-23 12:19:00 UTC ---
Please reduce the severity to trivial, and change it to "Confusing
diagnostic"!  It's my error, at root, but gfortran could do better.

I had forgotten the relevant constraint (C1006 in Fortran 2003).
However, the syntax rule R1005 on the same page specifies that a
width is mandatory for the L descriptor, so the actual error is
that a width of zero is erroneous.


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

* [Bug fortran/54679] Erroneous "Expected P edit descriptor" in conjunction with L descriptor
  2012-09-23 12:04 [Bug fortran/54679] New: Erroneous "Expected P edit descriptor" in conjunction with L descriptor nmm1 at cam dot ac.uk
  2012-09-23 12:19 ` [Bug fortran/54679] " nmm1 at cam dot ac.uk
@ 2012-09-23 16:24 ` kargl at gcc dot gnu.org
  2013-06-27  9:21 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: kargl at gcc dot gnu.org @ 2012-09-23 16:24 UTC (permalink / raw)
  To: gcc-bugs


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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P5
                 CC|                            |kargl at gcc dot gnu.org
           Severity|normal                      |trivial

--- Comment #2 from kargl at gcc dot gnu.org 2012-09-23 16:24:01 UTC ---
(In reply to comment #1)
> Please reduce the severity to trivial, and change it to "Confusing
> diagnostic"!  It's my error, at root, but gfortran could do better.
> 
> I had forgotten the relevant constraint (C1006 in Fortran 2003).
> However, the syntax rule R1005 on the same page specifies that a
> width is mandatory for the L descriptor, so the actual error is
> that a width of zero is erroneous.

I agree that the error message is confusing. First, the F2008 
constraint is 

C1006 (R1008) w shall be zero or positive for the I, B, O, Z, F,
      and G edit descriptors. w shall be positive for all other
      edit descriptors.

Second, we have 

10.8.5  P editing

   The k P edit descriptor temporarily changes (9.5.2) the scale
   factor for the connection to k . The scale factor affects the
   editing done by the F, E, EN, ES, D, and G edit descriptors
   for numeric quantities.

So P editing does not even apply to the L descriptor.


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

* [Bug fortran/54679] Erroneous "Expected P edit descriptor" in conjunction with L descriptor
  2012-09-23 12:04 [Bug fortran/54679] New: Erroneous "Expected P edit descriptor" in conjunction with L descriptor nmm1 at cam dot ac.uk
  2012-09-23 12:19 ` [Bug fortran/54679] " nmm1 at cam dot ac.uk
  2012-09-23 16:24 ` kargl at gcc dot gnu.org
@ 2013-06-27  9:21 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-27  9:21 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-06-27
     Ever confirmed|0                           |1

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Still present at revision 200429.


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

end of thread, other threads:[~2013-06-27  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-23 12:04 [Bug fortran/54679] New: Erroneous "Expected P edit descriptor" in conjunction with L descriptor nmm1 at cam dot ac.uk
2012-09-23 12:19 ` [Bug fortran/54679] " nmm1 at cam dot ac.uk
2012-09-23 16:24 ` kargl at gcc dot gnu.org
2013-06-27  9:21 ` dominiq at lps dot ens.fr

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).