Examples of short programs showing --O3 wrong results

From: Herman D. Knoble (SkipKnobleLESS_at_SPAMpsu.DOT.edu)
Date: 11/30/04


Date: Tue, 30 Nov 2004 11:24:46 -0500

I'm looking for small compilable/runable Fortran source (Fortran 77 or 90)
that by example exhibit that Optimization level 3 compiler option
(regardless of compiler vendor)
generates code that is not safe (will give wrong answers).

Many thanks for your help.
Skip Knoble

   Herman D. (Skip) Knoble, Research Associate
   (a computing professional for 38 years)
   Email: SkipKnobleLESS at SPAMpsu dot edu
   Web: http://www.personal.psu.edu/hdk
   Penn State Information Technology Services
    Academic Services and Emerging Technologies
     Graduate Education and Research Services
   Penn State University
     214C Computer Building
     University Park, PA 16802-21013
   Phone:+1 814 865-0818 Fax:+1 814 863-7049



Relevant Pages

  • Re: Large array using RH9 / ifort 8.0
    ... under Red Hat 8 and Intel compiler Version 8.0.039.042 with N=250000000 ... -|Have you tried using an Allocatable global array in a module? ... -| Penn State Information Technology Services ... Penn State Information Technology Services ...
    (comp.lang.fortran)
  • Re: fortran compilation
    ... incorrect subprogram argument/parameter mapping. ... a real debugging compiler and report ... Penn State Information Technology Services ...
    (comp.lang.fortran)
  • Re: Uninitialized variables
    ... In the case of Lahey I don't know if there is a compiler ... measure of correctness. ... Penn State Information Technology Services ...
    (comp.lang.fortran)
  • Re: fortran 90/95 compiler
    ... We have both free and commercial Fortran compilers for Linux listed at: ... Note that Intel offers a free compiler. ... Penn State Information Technology Services ...
    (comp.lang.fortran)
  • Re: C Fortran mixing languages
    ... Imagin1 F Compiler, when installed, has a running example of calling a C Subprogram. ... (Note that the full install of F includes both c and c++ compilers; ... See our reference Web page: ... Penn State Information Technology Services ...
    (comp.lang.fortran)