At revision 150716 the polyhedron test linpk.f90 compiled with -fwholefile at
-O3 does not give the right results:

[ibook-dhum] lin/test% gfc -O3 linpk.f90
[ibook-dhum] lin/test% time a.out 
     norm. resid      resid           machep         x(1)          x(n)
  2.50952975D+01  2.78588264D-11  2.22044605D-16  1.00000000D+00 
1.00000000D+00
27.756u 0.194s 0:28.12 99.3%    0+0k 0+0io 25pf+0w
[ibook-dhum] lin/test% gfc -O3 -fwhole-file linpk.f90
[ibook-dhum] lin/test% time a.out
     norm. resid      resid           machep         x(1)          x(n)
             NaN  0.00000000D+00  2.22044605D-16             NaN            
NaN
4.808u 0.071s 0:04.89 99.5%     0+0k 0+0io 0pf+0w
[ibook-dhum] lin/test% gfc -O2 -fwhole-file linpk.f90
[ibook-dhum] lin/test% time a.out
     norm. resid      resid           machep         x(1)          x(n)
  2.50952975D+01  2.78588264D-11  2.22044605D-16  1.00000000D+00 
1.00000000D+00
27.807u 0.232s 0:28.22 99.3%    0+0k 0+0io 0pf+0w
[ibook-dhum] lin/test% gfc -m64 -O3 -fwhole-file linpk.f90
[ibook-dhum] lin/test% time a.out
     norm. resid      resid           machep         x(1)          x(n)
             NaN  0.00000000D+00  2.22044605D-16             NaN            
NaN
5.016u 0.068s 0:05.18 97.8%     0+0k 0+0io 29pf+0w


-- 
           Summary: Wrong code for polyhedron test linpk.f90 compiled with -
                    fwholefile at -O3
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: *-apple-darwin9
  GCC host triplet: *-apple-darwin9
GCC target triplet: *-apple-darwin9


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

Reply via email to