<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Fortran 16-Byte Real optimization error in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/fortran-16-byte-real-optimization-error/m-p/5480945#M36680</link>
    <description>&lt;P&gt;The HP IA64 Fortran v8.1 compiler gives a "Compiler intenal error" with&amp;nbsp;16-Byte Reals.&lt;/P&gt;&lt;P&gt;If anyone can verify this behavior on new versions, it should be submited as a Problem Report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I whittled the offending program down to this test subroutine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Subroutine test( C &amp;nbsp;)&lt;BR /&gt;Double Precision A, B, C&lt;BR /&gt;Common / te1 / &amp;nbsp;&amp;nbsp;A, B&lt;BR /&gt;&lt;BR /&gt;if( C .le. 0. ) then&lt;BR /&gt;A = 0.&lt;BR /&gt;else&lt;BR /&gt;A = A - B&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;Return&lt;BR /&gt;End&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Compiling with &amp;nbsp;$Fortran /real=64 /int=64 /opt &amp;nbsp; crashes the compiler.&lt;/P&gt;&lt;P&gt;Compiling with /opt=lev=1 works OK.&lt;/P&gt;&lt;P&gt;Commenting out any single executable line works OK also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For comparison, compiling on AXP Fortran v7.6 gives no error even with opt=lev=5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use 16-Byte Double Precision frequently, so any comments on possible causes of this&lt;/P&gt;&lt;P&gt;oddity would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C. Fred Driscoll&lt;/P&gt;&lt;P&gt;UCSD Physics&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jan 2012 22:07:09 GMT</pubDate>
    <dc:creator>Charles F. Driscoll</dc:creator>
    <dc:date>2012-01-11T22:07:09Z</dc:date>
    <item>
      <title>Fortran 16-Byte Real optimization error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-16-byte-real-optimization-error/m-p/5480945#M36680</link>
      <description>&lt;P&gt;The HP IA64 Fortran v8.1 compiler gives a "Compiler intenal error" with&amp;nbsp;16-Byte Reals.&lt;/P&gt;&lt;P&gt;If anyone can verify this behavior on new versions, it should be submited as a Problem Report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I whittled the offending program down to this test subroutine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Subroutine test( C &amp;nbsp;)&lt;BR /&gt;Double Precision A, B, C&lt;BR /&gt;Common / te1 / &amp;nbsp;&amp;nbsp;A, B&lt;BR /&gt;&lt;BR /&gt;if( C .le. 0. ) then&lt;BR /&gt;A = 0.&lt;BR /&gt;else&lt;BR /&gt;A = A - B&lt;BR /&gt;endif&lt;BR /&gt;&lt;BR /&gt;Return&lt;BR /&gt;End&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Compiling with &amp;nbsp;$Fortran /real=64 /int=64 /opt &amp;nbsp; crashes the compiler.&lt;/P&gt;&lt;P&gt;Compiling with /opt=lev=1 works OK.&lt;/P&gt;&lt;P&gt;Commenting out any single executable line works OK also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For comparison, compiling on AXP Fortran v7.6 gives no error even with opt=lev=5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use 16-Byte Double Precision frequently, so any comments on possible causes of this&lt;/P&gt;&lt;P&gt;oddity would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C. Fred Driscoll&lt;/P&gt;&lt;P&gt;UCSD Physics&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2012 22:07:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-16-byte-real-optimization-error/m-p/5480945#M36680</guid>
      <dc:creator>Charles F. Driscoll</dc:creator>
      <dc:date>2012-01-11T22:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran 16-Byte Real optimization error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-16-byte-real-optimization-error/m-p/5480997#M36681</link>
      <description>&lt;P&gt;Compiles cleanly under&amp;nbsp;&amp;nbsp;HP Fortran V8.2-104939 with the command you give.&lt;/P&gt;&lt;P&gt;(Itanium 8.3-1h1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fwiw,&lt;/P&gt;&lt;P&gt;Hein&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;listing snippets.&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;VARIABLES&lt;/P&gt;&lt;P&gt;Address Type Name Address Type Name Address Type Name&lt;/P&gt;&lt;P&gt;2-00000000 R*8 A 2-00000008 R*8 B ** R*8 C&lt;/P&gt;&lt;P&gt;TEST Source Listing 11-JAN-2012 17:22:45 HP Fortran V8.2-104939 Page 2&lt;BR /&gt;11-JAN-2012 17:22:19 SYS$SYSDEVICE:[HEIN]TMP.FOR;3&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;/OPTIMIZE=(INLINE=SPEED,LEVEL=4,NOLOOPS,PIPELINE,TUNE=GENERIC,UNROLL=0)&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2012 22:30:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-16-byte-real-optimization-error/m-p/5480997#M36681</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2012-01-11T22:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran 16-Byte Real optimization error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-16-byte-real-optimization-error/m-p/5481227#M36682</link>
      <description>&lt;P&gt;If only all reproducers were as good as yours!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A compiler crashing is always a bug, please make a formal report to HP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Always test compiler problems against the latest version of the compiler. This is easy to do and non-privileged. Most compilers these days have mechanisms to allow you to maintain multiple versions. Even if the specific product doesn't have the feature, it's fairly easy to do yourself using logical names. Extract a later compiler from a kit, place it in your private directory and point&amp;nbsp;to it by logical name&amp;nbsp;logical name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hein's evidence shows that the bug may have been fixed in a later compiler, however, it's not possible to say if that's by design or by accident, so it's better if the compiler team see your excellent example. They can also add it to the regression suite to make sure the bug doesn't reappear.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2012 00:28:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-16-byte-real-optimization-error/m-p/5481227#M36682</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2012-01-12T00:28:31Z</dc:date>
    </item>
  </channel>
</rss>

