Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 249095 - >=sys-devel/gcc-4.2 - Bug in gfortran with combination of P and F in a format.
Summary: >=sys-devel/gcc-4.2 - Bug in gfortran with combination of P and F in a format.
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-27 16:41 UTC by Fred Krogh
Modified: 2009-02-22 02:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Krogh 2008-11-27 16:41:57 UTC
gfortran 4.2 and 4.3 (but not GNU Fortran 95 (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)) violate the standard with a format of the form  4P, F14.0.

Reproducible: Always

Steps to Reproduce:
Compile and run

      print '(f14.0,4pf14.0 )', 3742.0, 0.3742
      end

Actual Results:  
         3742.         0000.

Expected Results:  
         3742.         3742.


According to a long time member of X3J3

I agree that the discussion of P editing in 10.6.5.1 is silent
concerning F editing on output, which might lead one to conclude that it
has no effect.  But the last paragraph about F editing in 10.5.1.2.1
(167:23) says "modified by the established scale factor."  So I think
the new compiler is broken.

Four of my compilers (lf95, NAG, Intel, g95 (4.0.3 0.91!)) give your old
results.  gfortran (4.1.2 20071124) gives your new results, which I
think are wrong.
Comment 1 SpanKY gentoo-dev 2008-11-28 06:04:10 UTC
we really dont track fortran standards compliance ... you should be filing a bug here:
http://gcc.gnu.org/bugzilla/