<?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 Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746686#M4458</link>
    <description>Hi,
&lt;BR /&gt;
&lt;BR /&gt;This common block issue has been fixed in XCode 3.1.  Look at the man page for ld(1) and search for the -commons switch and its treatment options:  ignore_dylibs, use_dylibs, and error.  
&lt;BR /&gt;
&lt;BR /&gt;Hope this helps,    Todd</description>
    <pubDate>Mon, 25 Aug 2008 18:25:16 GMT</pubDate>
    <dc:creator>Todd_Peterson</dc:creator>
    <dc:date>2008-08-25T18:25:16Z</dc:date>
    <item>
      <title>Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746678#M4450</link>
      <description>Is anyone else having problems with Fortran COMMON blocks not being 'common' when compiled with Intel Fortran 10.1.007, then linked with mixed C/C++ shared libraries?  
&lt;BR /&gt;
&lt;BR /&gt;Using Xcode 2.4.1 and Intel Fortran 10.1.007, COMMON blocks that are in one dylib get properly referenced from another dylib, i.e. there's only one instance of the COMMON block symbols.  
&lt;BR /&gt;
&lt;BR /&gt;However, using the same compiler/linker flags but switching to Xcode 3.0, my common blocks are no longer common - each dylib that references them get their *own* copies.  
&lt;BR /&gt;
&lt;BR /&gt;I'm not using the Xcode 3.0 IDE, all my building is done from the command line; I am using the gcc linker to link.  Since this worked fine with Xcode 2.4.1, my tests point at it being an issue to take up with Apple, but I wanted to see if others have encountered the problem.  
&lt;BR /&gt;
&lt;BR /&gt;For what it's worth, I see the identical problem on PowerPC using the Absoft Pro Fortran 9.2 compiler.  
&lt;BR /&gt;
&lt;BR /&gt;Thanks, Todd.</description>
      <pubDate>Thu, 17 Jan 2008 16:40:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746678#M4450</guid>
      <dc:creator>Todd_Peterson</dc:creator>
      <dc:date>2008-01-17T16:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746679#M4451</link>
      <description>I believe I am seeing the same problem. I am using XCode 3 under Leopard.
&lt;BR /&gt;
&lt;BR /&gt;I am loading a dynamic library and calling an entry point from within an executable. The calling program can see the common block (which it defined) but the code inside the dylib cannot see the common block.
&lt;BR /&gt;
&lt;BR /&gt;Both the executable and the dylib are mixed C and Fortran. Both C and Fortran functions are able to see the common block in the executable, and neither are able to see it in the dylib.
&lt;BR /&gt;
&lt;BR /&gt;I wish I had more to contribute...
&lt;BR /&gt;
&lt;BR /&gt;- Mark</description>
      <pubDate>Sat, 19 Jan 2008 04:14:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746679#M4451</guid>
      <dc:creator>mmalson1</dc:creator>
      <dc:date>2008-01-19T04:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746680#M4452</link>
      <description>Thanks for the feedback.  I created a small example with a dylib and a separate executable - each has the same common block definition.  When I build using Xcode 3, there are two different instances of the common block - if I set common block values in a function in the dylib, those values are not reflected in the executable.  
&lt;BR /&gt;
&lt;BR /&gt;Compiling the same example using Xcode 2.4.1 will produce expected results.  Perhaps there are changes I need to make for Xcode 3, but I'll contact Apple to find out, and file a bug if this is indeed an Xcode 3 bug.
&lt;BR /&gt;
&lt;BR /&gt;-Todd</description>
      <pubDate>Mon, 21 Jan 2008 15:15:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746680#M4452</guid>
      <dc:creator>Todd_Peterson</dc:creator>
      <dc:date>2008-01-21T15:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746681#M4453</link>
      <description>&lt;P&gt;&lt;FONT face="Courier New" color="#0000ff" size="2"&gt;Please reporthere what you learn from Apple.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color="#0000ff" size="2"&gt;Thanks.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2008 19:28:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746681#M4453</guid>
      <dc:creator>Jeffrey_A_Intel</dc:creator>
      <dc:date>2008-01-21T19:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746682#M4454</link>
      <description>Sure thing.  My sources at Apple say they are aware of the problem and it will be fixed in an upcoming Xcode 3 release.  They did not mention any timeframe.  
&lt;BR /&gt;
&lt;BR /&gt;Hope this helps.</description>
      <pubDate>Tue, 22 Jan 2008 18:56:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746682#M4454</guid>
      <dc:creator>Todd_Peterson</dc:creator>
      <dc:date>2008-01-22T18:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746683#M4455</link>
      <description>FWIW I'm having the same problem in 10.1.008.</description>
      <pubDate>Tue, 05 Feb 2008 20:04:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746683#M4455</guid>
      <dc:creator>mmalson1</dc:creator>
      <dc:date>2008-02-05T20:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746684#M4456</link>
      <description>Any word on this bug?  I have not renewed my Intel FORTRAN subscription because of this bug. Is the FORTRAN still being supported by Intel? Did anyone file a bug report on Apple's website? XCode 3.0 and 3.1 have not fixed this problem...</description>
      <pubDate>Fri, 01 Aug 2008 06:10:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746684#M4456</guid>
      <dc:creator>mmalson</dc:creator>
      <dc:date>2008-08-01T06:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746685#M4457</link>
      <description>&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;If &lt;A href="mailto:tpeterson@spss.com"&gt;tpeterson@spss.com&lt;/A&gt; is still reading, if you filed a bug willyou please post your Radar#?&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Yes, Intel still supports our Fortran compiler, however, we do not have control over the OS vendors tools. In this case, the root-cause lies with the GNU linker (ld) provided w/Xcode. I will check on the status from Apple and post again if there is any news.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;I am unable to show success with Xcode 2.4.1 with the example below (sans the DLLEXPORT/DLLIMPORT), so I do not know how it differs from codes reported earlier that work with Xcode 2.4.1 but fail with the newer Xcode 3.x. It would be interesting to see a sample that works with Xcode 2.4.1 if anyone has one.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;As a work-around one could consider using DLLIMPORT/DLLEXPORT directives with the Intel Fortran compiler as shown in the example below. Support for these directives was added in an earlier 9.1 update. This works with Xcode 3.0 and our latest 10.1.015 update.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;U&gt;main.f90:&lt;P&gt;&lt;/P&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;PROGRAM CTEST&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;!DEC$ ATTRIBUTES C, ALIAS:'_TESTSUB3' :: TESTSUB3&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;CALL TESTSUB1&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;CALL TESTSUB2&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;CALL TESTSUB3&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;CALL TESTSUB2&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;STOP&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;END&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;U&gt;sub1.f90:&lt;P&gt;&lt;/P&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;SUBROUTINE TESTSUB1&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;!dec$ attributes dllexport :: CMBLK1&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;COMMON/CMBLK1/A,B&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;INTEGER A,B&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;DATA A,B/0,20/&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;END&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;U&gt;sub2.f90:&lt;P&gt;&lt;/P&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;SUBROUTINE TESTSUB2&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;!dec$ attributes dllimport :: CMBLK1&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;COMMON/CMBLK1/A,B&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;INTEGER A,B&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;IF (A==0) PRINT *,'Fortran TESTSUB2, B = ',B, 'should be 20 '&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;IF (A==1) PRINT *,'Back to Fortran TESTSUB2, B = ',B, 'should be 21 '&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;RETURN&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;END&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&lt;U&gt;sub3.c:&lt;P&gt;&lt;/P&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;#include &lt;STDIO.H&gt;&lt;P&gt;&lt;/P&gt;&lt;/STDIO.H&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;struct comstruct{&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;int A;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;int B;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;};&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;extern struct comstruct cmblk1_;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;void TESTSUB3(void)&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;{&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;cmblk1_.A = 1;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;cmblk1_.B = cmblk1_.B + 1;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;printf(" C TESTSUB3, A is: %d
",cmblk1_.A);&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;printf(" C TESTSUB3, B is: %d
",cmblk1_.B);&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;}&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;Compile/link using the Intel 64 compiler and gcc as follows:&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;ifort -dynamiclib -o sub1.dylib sub1.f90 -Wl,-single_module -Wl,-undefined dynamic_lookup&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;ifort -dynamiclib -o sub2.dylib sub2.f90 -Wl,-single_module -Wl,-undefined dynamic_lookup&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;gcc -m64 -dynamiclib -o sub3.dylib sub3.c -Wl,-flat_namespace,-single_module,-U,_cmblk1_&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNo" rmal=""&gt;&lt;SPAN&gt;&lt;FONT face="Courier New"&gt;ifort -o main main.f90 sub1.dylib sub2.dylib sub3.dylib -Wl,-bind_at_load&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;The correct results will be:&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;Fortran TESTSUB2, B =&lt;SPAN&gt; &lt;/SPAN&gt;20 should be 20&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;C TESTSUB3, A is: 1&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;C TESTSUB3, B is: 21&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;Back to Fortran TESTSUB2, B =&lt;SPAN&gt; &lt;/SPAN&gt;21 should be 21&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;
&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;/P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2008 17:57:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746685#M4457</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2008-08-01T17:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746686#M4458</link>
      <description>Hi,
&lt;BR /&gt;
&lt;BR /&gt;This common block issue has been fixed in XCode 3.1.  Look at the man page for ld(1) and search for the -commons switch and its treatment options:  ignore_dylibs, use_dylibs, and error.  
&lt;BR /&gt;
&lt;BR /&gt;Hope this helps,    Todd</description>
      <pubDate>Mon, 25 Aug 2008 18:25:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746686#M4458</guid>
      <dc:creator>Todd_Peterson</dc:creator>
      <dc:date>2008-08-25T18:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746687#M4459</link>
      <description>To expound a little more on my previous reply, in order for Fortran common blocks to be common across libraries, use
&lt;BR /&gt;
&lt;BR /&gt;-commons use_dylibs
&lt;BR /&gt;
&lt;BR /&gt;if you'd like to send this through to the linker from gcc, just use :
&lt;BR /&gt;
&lt;BR /&gt;-Wl,-commons,use_dylibs
&lt;BR /&gt;
&lt;BR /&gt;This has worked for me in my small sample program I submitted to Apple to show the problem.  
&lt;BR /&gt;
&lt;BR /&gt;The Radar bug I filed was #5697630; it got closed as a duplicate of #5132652.  
&lt;BR /&gt;
&lt;BR /&gt;Best regards,
&lt;BR /&gt;Todd</description>
      <pubDate>Mon, 25 Aug 2008 19:08:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746687#M4459</guid>
      <dc:creator>Todd_Peterson</dc:creator>
      <dc:date>2008-08-25T19:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746688#M4460</link>
      <description>&lt;DIV id="_mcePaste"&gt;I decided to try this again, and it still appears to not work. I've distilled it down quite a bit, it's just a shell script.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;#!/bin/sh&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;rm -f sub.f90 main.f90 *.o static dylib&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;cat &amp;gt;sub.f90 &amp;lt;&lt;EOT&gt;&lt;/EOT&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  SUBROUTINE TESTSUB&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  !dec$ attributes dllimport :: CMBLK1&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  COMMON/CMBLK1/A,B&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  INTEGER A,B&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  PRINT *,'TESTSUB: location of A is ',%loc(A)&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  PRINT *,'TESTSUB: A = ',A&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  RETURN&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  END&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;EOT&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;cat &amp;gt;main.f90 &amp;lt;&lt;EOT&gt;&lt;/EOT&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  PROGRAM FTEST&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  !dec$ attributes dllexport :: CMBLK1&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  COMMON/CMBLK1/A,B&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  INTEGER A,B&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  DATA A,B/555,20/&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  PRINT *,'-----------'&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  PRINT *,'MAIN:  location of A is ',%loc(A)&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  PRINT *,'MAIN:  A = ',A&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  CALL TESTSUB&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  PRINT *,'-----------'&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  STOP&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  END&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;EOT&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;ifort -dynamiclib -o sub.dylib sub.f90 -Wl,-single_module -Wl,-undefined,dynamic_lookup -dyncom="CMBLKL1"&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;ifort -c     -o main.o   main.f90         -Wl,-undefined,dynamic_lookup -dyncom="CMBLKL1"&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;ifort -o static main.f90 sub.f90             -Wl,-undefined,dynamic_lookup -dyncom="CMBLKL1"&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;ifort -o dylib main.o sub.dylib              -Wl,-undefined,dynamic_lookup -dyncom="CMBLKL1"&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;./static&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;./dylib&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The output of the two programs should be the same, or at least the values of A should match. Currently the output is:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;-----------&lt;/DIV&gt;&lt;DIV&gt;MAIN:  location of A is       4295546224&lt;/DIV&gt;&lt;DIV&gt;MAIN:  A =     555&lt;/DIV&gt;&lt;DIV&gt;TESTSUB: location of A is       4295546224&lt;/DIV&gt;&lt;DIV&gt;TESTSUB: A =     555&lt;/DIV&gt;&lt;DIV&gt;-----------&lt;/DIV&gt;&lt;DIV&gt;-----------&lt;/DIV&gt;&lt;DIV&gt;MAIN:  location of A is       4294983984&lt;/DIV&gt;&lt;DIV&gt;MAIN:  A =     555&lt;/DIV&gt;&lt;DIV&gt;TESTSUB: location of A is       4295624224&lt;/DIV&gt;&lt;DIV&gt;TESTSUB: A =      0&lt;/DIV&gt;&lt;DIV&gt;-----------&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Is there an option I'm missing? I thought this was fixed.&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Jul 2011 16:38:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746688#M4460</guid>
      <dc:creator>mmalson</dc:creator>
      <dc:date>2011-07-18T16:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746689#M4461</link>
      <description>Oh, and BTW I downloaded the latest ifort last night.</description>
      <pubDate>Mon, 18 Jul 2011 16:40:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746689#M4461</guid>
      <dc:creator>mmalson</dc:creator>
      <dc:date>2011-07-18T16:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Xcode 3.0, Intel Fortran 10.1.007 and FORTRAN common blocks</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746690#M4462</link>
      <description>BTW I downloaded the latest ifort last night.&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The -dyncom options do nothing because I spelled the common block name wrong. If I spell it right, I get errors, so disregard them.&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Jul 2011 16:43:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Xcode-3-0-Intel-Fortran-10-1-007-and-FORTRAN-common-blocks/m-p/746690#M4462</guid>
      <dc:creator>mmalson</dc:creator>
      <dc:date>2011-07-18T16:43:13Z</dc:date>
    </item>
  </channel>
</rss>

