public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35036]  New: illegal E format descriptor produces wrong output
@ 2008-01-31  2:01 furue at hawaii dot edu
  2008-01-31  2:25 ` [Bug fortran/35036] " pinskia at gcc dot gnu dot org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: furue at hawaii dot edu @ 2008-01-31  2:01 UTC (permalink / raw)
  To: gcc-bugs

"E8.0" is an illegal format descriptor, but g77 produces a wrong output
"0.1+01" for a value of 1e5, instead of a more sensible "********" .

$ cat tmp.f
      a = 1.e5
      write(*,'(E8.0)') a
      end
$ g77 --version
GNU Fortran (GCC) 3.4.6 (Debian 3.4.6-6)
[. . .]
$ g77 tmp.f
$ ./a.out
  0.1+01
$

OK, since the format descriptor is illegal, g77 has the right to produce
anything it likes, but producing a wrong output without warning is a poor
handling of the error.

Regards,
Ryo


-- 
           Summary: illegal E format descriptor produces wrong output
           Product: gcc
           Version: 3.4.6
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: furue at hawaii dot edu


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
@ 2008-01-31  2:25 ` pinskia at gcc dot gnu dot org
  2008-01-31  3:06 ` kargl at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-31  2:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-01-31 01:29 -------
Hmm, gfortran produces something slightly different:
[dhcp-10-98-10-23:~] apinski% ~/local-gcc/bin/gfortran t.f -pedantic
[dhcp-10-98-10-23:~] apinski% ./a.out
  0.E+01


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
  2008-01-31  2:25 ` [Bug fortran/35036] " pinskia at gcc dot gnu dot org
@ 2008-01-31  3:06 ` kargl at gcc dot gnu dot org
  2008-01-31  3:10 ` furue at hawaii dot edu
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: kargl at gcc dot gnu dot org @ 2008-01-31  3:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kargl at gcc dot gnu dot org  2008-01-31 01:46 -------
(In reply to comment #0)
> "E8.0" is an illegal format descriptor,

Can you cite from the Fortran 95 standard why this is illegal?


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
  2008-01-31  2:25 ` [Bug fortran/35036] " pinskia at gcc dot gnu dot org
  2008-01-31  3:06 ` kargl at gcc dot gnu dot org
@ 2008-01-31  3:10 ` furue at hawaii dot edu
  2008-01-31  4:10 ` kargl at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: furue at hawaii dot edu @ 2008-01-31  3:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from furue at hawaii dot edu  2008-01-31 02:00 -------
Subject: Re:  illegal E format descriptor produces wrong
 output

Hi,

| ------- Comment #2 from kargl at gcc dot gnu dot org  2008-01-31 01:46
-------
| (In reply to comment #0)
| > "E8.0" is an illegal format descriptor,
| 
| Can you cite from the Fortran 95 standard why this is illegal?

Good question :-)  Unfortunately, I don't have a Fortran 95 reference
at hand, and so let me refer to the F77 standard:

  http://www.fortran.com/fortran/F77_std/rjcnf.html


<QUOTE>
13.5.9.2.2 E and D Editing.
The Ew.d, Dw.d, and Ew.dEe edit descriptors indicate that the external
field occupies w positions, the fractional part of which consists of d
digits, unless a scale factor greater than one is in effect, and the
exponent part consists of e digits. The e has no effect on input. 

[. . .]

The scale factor k controls the decimal normalization (13.5.7). If -d
< k <= 0, the output field contains exactly |k| leading zeros and d -
|k| significant digits after the decimal point. If 0 < k < d + 2, the
output field contains exactly k significant digits to the left of the
decimal point and d - k + 1 significant digits to the right of the
decimal point. Other values of k are not permitted.
</QUOTE>

When d = 0, the only possible value for the scaling factor k is 1.
Since "Other values of k are not permitted", you *must* use "1P"
with d = 0, as "1PE8.0".  Q.E.D.

. . . I know this is a rather roundabout logic, and I'm not 100% sure,
actually.  I'm curious.

Now, *if* "E8.0" is legal, what output should be generated for a value
of 1e5 ?  "0.E5" ?

Cheers,
Ryo


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (2 preceding siblings ...)
  2008-01-31  3:10 ` furue at hawaii dot edu
@ 2008-01-31  4:10 ` kargl at gcc dot gnu dot org
  2008-01-31  4:44 ` furue at hawaii dot edu
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: kargl at gcc dot gnu dot org @ 2008-01-31  4:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from kargl at gcc dot gnu dot org  2008-01-31 02:24 -------
(In reply to comment #3)
> Subject: Re:  illegal E format descriptor produces wrong
>  output
> 
> Hi,
> 
> | ------- Comment #2 from kargl at gcc dot gnu dot org  2008-01-31 01:46
> -------
> | (In reply to comment #0)
> | > "E8.0" is an illegal format descriptor,
> | 
> | Can you cite from the Fortran 95 standard why this is illegal?
> 
> Good question :-)  Unfortunately, I don't have a Fortran 95 reference
> at hand, and so let me refer to the F77 standard:
> 
>   http://www.fortran.com/fortran/F77_std/rjcnf.html
> 
> 
> <QUOTE>
> 13.5.9.2.2 E and D Editing.
> The Ew.d, Dw.d, and Ew.dEe edit descriptors indicate that the external
> field occupies w positions, the fractional part of which consists of d
> digits, unless a scale factor greater than one is in effect, and the
> exponent part consists of e digits. The e has no effect on input. 
> 
> [. . .]
> 
> The scale factor k controls the decimal normalization (13.5.7). If -d
> < k <= 0, the output field contains exactly |k| leading zeros and d -
> |k| significant digits after the decimal point. If 0 < k < d + 2, the
> output field contains exactly k significant digits to the left of the
> decimal point and d - k + 1 significant digits to the right of the
> decimal point. Other values of k are not permitted.
> </QUOTE>
> 
> When d = 0, the only possible value for the scaling factor k is 1.
> Since "Other values of k are not permitted", you *must* use "1P"
> with d = 0, as "1PE8.0".  Q.E.D.
> 
> . . . I know this is a rather roundabout logic, and I'm not 100% sure,
> actually.  I'm curious.
> 
> Now, *if* "E8.0" is legal, what output should be generated for a value
> of 1e5 ?  "0.E5" ?

Actually, I think the 'correct' output might be 0.E6.

There is no restriction in F95 that d must be positive in Ew.d.
In 10.6.5.1, it clearly states that k = 0 at the beginning of 
execution of an input/output statement.  The wording you quote
above is (almost) identical to F95 language, so one could argue
that the -d < k <= 0 is true when d = 0 and k = 0.  Yes, it might
be a stupid interpretation, but then again the standard sometime
defies logic.

In any event, gfortran is definitely giving a bogus answer
of 0E+1, and your desired output of ******* is probably the
right thing to do.

jerry, any comments?


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (3 preceding siblings ...)
  2008-01-31  4:10 ` kargl at gcc dot gnu dot org
@ 2008-01-31  4:44 ` furue at hawaii dot edu
  2008-01-31  5:46 ` kargl at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: furue at hawaii dot edu @ 2008-01-31  4:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from furue at hawaii dot edu  2008-01-31 02:45 -------
Subject: Re:  illegal E format descriptor produces wrong
 output

| There is no restriction in F95 that d must be positive in Ew.d.
| In 10.6.5.1, it clearly states that k = 0 at the beginning of 
| execution of an input/output statement.  The wording you quote
| above is (almost) identical to F95 language, so one could argue
| that the -d < k <= 0 is true when d = 0 and k = 0.

I may be missing something, but "-d < k <= 0" doesn't hold
when d = 0 and k = 0.  Notice the inequality "<".  So, when k = 0,
how should we read the part we quote?

| In any event, gfortran is definitely giving a bogus answer
| of 0E+1, and your desired output of ******* is probably the
| right thing to do.

I like that.  But, for the sake of curiosity, how does the Fortran
standard describe the process that leads to *******?  I mean, suppose
E8.0 is legal, but still can we emit *******?

Ryo


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (4 preceding siblings ...)
  2008-01-31  4:44 ` furue at hawaii dot edu
@ 2008-01-31  5:46 ` kargl at gcc dot gnu dot org
  2008-01-31  6:55 ` jvdelisle at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: kargl at gcc dot gnu dot org @ 2008-01-31  5:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from kargl at gcc dot gnu dot org  2008-01-31 04:09 -------
(In reply to comment #5)
> Subject: Re:  illegal E format descriptor produces wrong
>  output
> 
> | There is no restriction in F95 that d must be positive in Ew.d.
> | In 10.6.5.1, it clearly states that k = 0 at the beginning of 
> | execution of an input/output statement.  The wording you quote
> | above is (almost) identical to F95 language, so one could argue
> | that the -d < k <= 0 is true when d = 0 and k = 0.
> 
> I may be missing something, but "-d < k <= 0" doesn't hold
> when d = 0 and k = 0.  Notice the inequality "<".  So, when k = 0,
> how should we read the part we quote?

Notice the "=".  -d < k <= 0 goes to -(d=0) < (k=0) <= 0 --> -0 < 0 <= 0.
Zero is certainly less than or equal to zero.

This case is probably covered in some murky, musty corner of the standard,
but I haven't found it, yet.  Jerry and Thomas are the IO gurus.

> 
> | In any event, gfortran is definitely giving a bogus answer
> | of 0E+1, and your desired output of ******* is probably the
> | right thing to do.
> 
> I like that.  But, for the sake of curiosity, how does the Fortran
> standard describe the process that leads to *******?  I mean, suppose
> E8.0 is legal, but still can we emit *******?

The *** are emitted when the result can't fit into the requested field.
Off the top of my head, the easiest example is E8.1E1 for x = 1e25.
The exponent field is too small, or I2 and i = 100.


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (5 preceding siblings ...)
  2008-01-31  5:46 ` kargl at gcc dot gnu dot org
@ 2008-01-31  6:55 ` jvdelisle at gcc dot gnu dot org
  2008-01-31  6:56 ` furue at hawaii dot edu
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-01-31  6:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jvdelisle at gcc dot gnu dot org  2008-01-31 05:45 -------
I will have to study the Standard some more as well.  Off the top of my head I
have a vague recollection of working a bug like this before and we fixed it.  I
will check into this.


-- 

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         |2008-01-31 05:45:32
               date|                            |


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (6 preceding siblings ...)
  2008-01-31  6:55 ` jvdelisle at gcc dot gnu dot org
@ 2008-01-31  6:56 ` furue at hawaii dot edu
  2008-01-31  8:17 ` jvdelisle at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: furue at hawaii dot edu @ 2008-01-31  6:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from furue at hawaii dot edu  2008-01-31 06:16 -------
Subject: Re:  illegal E format descriptor produces wrong
 output

| > I may be missing something, but "-d < k <= 0" doesn't hold
| > when d = 0 and k = 0.  Notice the inequality "<".  So, when k = 0,
| > how should we read the part we quote?
| 
| Notice the "=".  -d < k <= 0 goes to -(d=0) < (k=0) <= 0 --> -0 < 0 <= 0.
| Zero is certainly less than or equal to zero.

But, what about "-0 < 0"?   Do you mean that this inequality holds?
Do you mean to say minus integer zero is smaller than plus integer zero?

| > I like that.  But, for the sake of curiosity, how does the Fortran
| > standard describe the process that leads to *******?  I mean, suppose
| > E8.0 is legal, but still can we emit *******?
| 
| The *** are emitted when the result can't fit into the requested field.
| Off the top of my head, the easiest example is E8.1E1 for x = 1e25.
| The exponent field is too small, or I2 and i = 100.

Yes, but do you claim that "the result can't fit
into the requested field" for

      write(*, '(E8.0)') 1e5

supposing that E8.0 be legal?  As you suggested, one "correct" output
is "0.E+06", which would certainly "fit" in eight columns.  Then why
reject an output of "0.E+06" and replace it with "********" ?

What I'm getting at is that *if* E8.0 be legal and if you plan to emit
"********" for 1e5, you need a reason for that decision.

Ryo


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (7 preceding siblings ...)
  2008-01-31  6:56 ` furue at hawaii dot edu
@ 2008-01-31  8:17 ` jvdelisle at gcc dot gnu dot org
  2008-01-31 14:10 ` burnus at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-01-31  8:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jvdelisle at gcc dot gnu dot org  2008-01-31 06:27 -------
Sun f95 gives:

 ******  FORTRAN RUN-TIME SYSTEM  ******
 Error 1078:  scale factor out of range
 Location:  the WRITE statement at line 2 of "pr35036.f"
 Unit:  *
 File:  standard output
Aborted

ifort gives:
$ ifort pr35036.f90 
$ ./a.out
********


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (8 preceding siblings ...)
  2008-01-31  8:17 ` jvdelisle at gcc dot gnu dot org
@ 2008-01-31 14:10 ` burnus at gcc dot gnu dot org
  2008-02-02  8:28 ` jvdelisle at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-01-31 14:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from burnus at gcc dot gnu dot org  2008-01-31 12:46 -------
(In reply to comment #9)
> Sun f95 gives:
>  Error 1078:  scale factor out of range
> ifort gives:
> ********

g95 and openf95 give the same result as ifort:
 ********

While NAG f95 follows sunf95 by giving the run-time error:
 Scale factor 0 out of range for d=0

This is for "write(*, '(E8.0)') 1e5".


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (9 preceding siblings ...)
  2008-01-31 14:10 ` burnus at gcc dot gnu dot org
@ 2008-02-02  8:28 ` jvdelisle at gcc dot gnu dot org
  2008-02-02 11:14 ` dominiq at lps dot ens dot fr
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-02  8:28 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]



------- Comment #11 from jvdelisle at gcc dot gnu dot org  2008-02-02 08:28 -------
Here is a different view on this; from the standard:

For an internal value that is neither an IEEE infinity nor a NaN, the form of
the output field for a scale factor of zero is:

       [ ± ] [0].x1 x2 . . . xd exp

where:

        ± signifies a plus sign or a minus sign.

        . signifies a decimal symbol (10.5).

        x1 x2 . . . xd are the d most significant digits of the internal value
        after rounding.

You will notice that the series of significant digits begins with x(1) going up
to x(d).  x(0) is not defined in the allowable output.  This makes sense since
this particular format has no significant digits to the left of the decimal
point and it is meaningless not to display at least 1 significant digit.

I would say then that the code is invalid.

Further, I don't think the discussion in the standard about the scaling factor
k is intended to say anything about the value of d, it is only speaking of what
to do under certain conditions of k relative to d.

Now if you look at the output from this simple test program:

      a = 1.e5
      write(*,'(E15.0)') a
      write(*,'(E15.1)') a
      write(*,'(E15.2)') a
      write(*,'(E15.3)') a
      write(*,'(E15.4)') a
      write(*,'(E15.5)') a
      write(*,'(E15.6)') a
      write(*,'(E15.7)') a
      write(*,'(E15.8)') a
      end
$ gfc pr35036.f 
$ ./a.out
         0.E+01
        0.1E+06
       0.10E+06
      0.100E+06
     0.1000E+06
    0.10000E+06
   0.100000E+06
  0.1000000E+06
 0.10000000E+06

The pattern is clear and it breaks to nonsense for d=0.

The standard (F2003) also says: "10.6.1 (5) However, the processor shall not
produce asterisks if the field width is not exceeded when optional characters
are omitted.

I don't think this case is an issue of exceeding the width.  Therefore I think
a runtime error is appropriate.  Even better would be a compile time error as
well.


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (10 preceding siblings ...)
  2008-02-02  8:28 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-02 11:14 ` dominiq at lps dot ens dot fr
  2008-02-02 19:37 ` jvdelisle at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-02-02 11:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from dominiq at lps dot ens dot fr  2008-02-02 11:13 -------
I agree that "If -d < k <= 0" is confusing when you don't specify k. However
you can remove the k and get "if -d<0", aka "if 0<d", then in my opinion it
rule out d<=0 and the format Ew.0 is invalid and should diagnosed at compile
time when possible.


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (11 preceding siblings ...)
  2008-02-02 11:14 ` dominiq at lps dot ens dot fr
@ 2008-02-02 19:37 ` jvdelisle at gcc dot gnu dot org
  2008-02-03  0:07 ` jvdelisle at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-02 19:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from jvdelisle at gcc dot gnu dot org  2008-02-02 19:36 -------
Created an attachment (id=15081)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15081&action=view)
Proposed patch

This patch provides an error for precision (number of digits left of decimal
point) specified with E and D formats.  This is consistent with the Standards
and Sun f95.  It also gives an error if the scaling factor is out of acceptable
range.


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (12 preceding siblings ...)
  2008-02-02 19:37 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-03  0:07 ` jvdelisle at gcc dot gnu dot org
  2008-02-21  2:21 ` jvdelisle at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-03  0:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from jvdelisle at gcc dot gnu dot org  2008-02-03 00:06 -------
Created an attachment (id=15082)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15082&action=view)
Revised test case

This test case is updated with additional tests.


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (13 preceding siblings ...)
  2008-02-03  0:07 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-21  2:21 ` jvdelisle at gcc dot gnu dot org
  2008-02-21  2:24 ` jvdelisle at gcc dot gnu dot org
  2008-02-21  2:24 ` jvdelisle at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-21  2:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from jvdelisle at gcc dot gnu dot org  2008-02-21 02:21 -------
Subject: Bug 35036

Author: jvdelisle
Date: Thu Feb 21 02:20:27 2008
New Revision: 132510

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132510
Log:
2008-02-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libfortran/35036
        * write_float.def (output_float):  Add error checks for zero digits
        after decimal point in E and D format specifiers.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/io/write_float.def


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (15 preceding siblings ...)
  2008-02-21  2:24 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-21  2:24 ` jvdelisle at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-21  2:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from jvdelisle at gcc dot gnu dot org  2008-02-21 02:23 -------
Subject: Bug 35036

Author: jvdelisle
Date: Thu Feb 21 02:22:45 2008
New Revision: 132511

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132511
Log:
2008-02-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libfortran/35036
        * gfortran.dg/fmt_zero_digits.f90: Revise test.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/fmt_zero_digits.f90


-- 


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


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

* [Bug fortran/35036] illegal E format descriptor produces wrong output
  2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
                   ` (14 preceding siblings ...)
  2008-02-21  2:21 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-21  2:24 ` jvdelisle at gcc dot gnu dot org
  2008-02-21  2:24 ` jvdelisle at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-21  2:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from jvdelisle at gcc dot gnu dot org  2008-02-21 02:23 -------
Fixed on trunk.


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.0


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


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

end of thread, other threads:[~2008-02-21  2:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-31  2:01 [Bug fortran/35036] New: illegal E format descriptor produces wrong output furue at hawaii dot edu
2008-01-31  2:25 ` [Bug fortran/35036] " pinskia at gcc dot gnu dot org
2008-01-31  3:06 ` kargl at gcc dot gnu dot org
2008-01-31  3:10 ` furue at hawaii dot edu
2008-01-31  4:10 ` kargl at gcc dot gnu dot org
2008-01-31  4:44 ` furue at hawaii dot edu
2008-01-31  5:46 ` kargl at gcc dot gnu dot org
2008-01-31  6:55 ` jvdelisle at gcc dot gnu dot org
2008-01-31  6:56 ` furue at hawaii dot edu
2008-01-31  8:17 ` jvdelisle at gcc dot gnu dot org
2008-01-31 14:10 ` burnus at gcc dot gnu dot org
2008-02-02  8:28 ` jvdelisle at gcc dot gnu dot org
2008-02-02 11:14 ` dominiq at lps dot ens dot fr
2008-02-02 19:37 ` jvdelisle at gcc dot gnu dot org
2008-02-03  0:07 ` jvdelisle at gcc dot gnu dot org
2008-02-21  2:21 ` jvdelisle at gcc dot gnu dot org
2008-02-21  2:24 ` jvdelisle at gcc dot gnu dot org
2008-02-21  2:24 ` 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).