<?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: Trouble with Logical .AND. Operator in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842217#M60186</link>
    <description>&lt;P&gt;Steve,&lt;/P&gt;
&lt;P&gt;If this is "perfectly legal Fortran", how is it that during a debug session I would get the divide by zero when the values of &lt;EM&gt;joined &lt;/EM&gt;and &lt;EM&gt;previouslyseparated&lt;/EM&gt; are revealed via cursor hovering to be .TRUE. and .FALSE. respectively, and the hover-revealed value of "(joined.and.previouslyseparated)" shows as .FALSE.?&lt;/P&gt;
&lt;P&gt;The parentheses served as a proper gate, preventing the divide-by-zero as soon as I removed &lt;EM&gt;separate(kkk)&lt;/EM&gt; from the LOGICAL statement.&lt;/P&gt;
&lt;P&gt;Thanks again, asnd God bless!&lt;/P&gt;
&lt;P&gt;Jack&lt;/P&gt;</description>
    <pubDate>Mon, 27 Aug 2007 15:38:57 GMT</pubDate>
    <dc:creator>jackosullivan1</dc:creator>
    <dc:date>2007-08-27T15:38:57Z</dc:date>
    <item>
      <title>Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842207#M60176</link>
      <description>&lt;P&gt;Compiling a purely Fortran program -- self-contained exe --with the following options generated through the MS VisualStudio 2003.NET (a la Visual C++.NET):&lt;/P&gt;
&lt;P&gt;/nologo /Zi /Od /include:"Debug/" /fpscomp:filesfromcmd /fpscomp:ioformat&lt;BR /&gt;/fpscomp:logicals /fpscomp:general /error_limit:10 /warn:errors /warn:unused&lt;BR /&gt;/warn:interfaces /real_size:64 /Qsave /align:rec8byte /align:dcommons&lt;BR /&gt;/assume:dummy_aliases /Qzero /fpe:0 /iface:cvf /module:"Debug/" /object:"Debug/" &lt;BR /&gt;/traceback /check:bounds /check:format /libs:qwin /c&lt;/P&gt;
&lt;P&gt;I'm getting an erroneous ".TRUE." with the following code which is in a .f90 source file. I am linking it witha large number of .for files, but all the action involved in this erroris local to the .f90source. (Line numbers are for reference only and not included in the code):&lt;/P&gt;
&lt;P&gt;1 Logical a,b&lt;/P&gt;
&lt;P&gt;2 x=1.&lt;BR /&gt;3 y=2.&lt;BR /&gt;4 a=.TRUE.&lt;BR /&gt;5 v=0.&lt;BR /&gt;6 if(v=0.)b=.FALSE.&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;7 if(a .AND. b)then&lt;BR /&gt;8 p=x/v&lt;BR /&gt;9 else&lt;BR /&gt;10 p=x/y&lt;BR /&gt;11 endif&lt;/P&gt;
&lt;P&gt;Line 8 gets executed whenever a is .TRUE. (according to the cursor-hover help in MSVS2003.net), regardless of the value of b... not a nice thing when I have a zero in v.&lt;/P&gt;
&lt;P&gt;Any ideas on what I might be doing wrong would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thanks and God bless!&lt;BR /&gt;Jack O'Sullivan&lt;/P&gt;</description>
      <pubDate>Sat, 25 Aug 2007 05:54:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842207#M60176</guid>
      <dc:creator>jackosullivan1</dc:creator>
      <dc:date>2007-08-25T05:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842208#M60177</link>
      <description>I would ask that you verify that line 8 is actually being executed and that it isn't just the debugger making a mistake. PC-line correlation information can sometimes be flaky.&lt;BR /&gt;&lt;BR /&gt;I will also say that sometimes I see paraphrasing of code that doesn't match the actual code. If you can show that the wrong line is actually being executed, please create a complete test case and submit it to Intel Premier Support.&lt;BR /&gt;</description>
      <pubDate>Sat, 25 Aug 2007 12:28:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842208#M60177</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-08-25T12:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842209#M60178</link>
      <description>In fact, the way you have quoted the code, it should throw a compile error. If you wrote the same kind of thing in C, and disabled warnings, you would get the kind of behavior you report.&lt;BR /&gt;</description>
      <pubDate>Sat, 25 Aug 2007 16:27:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842209#M60178</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2007-08-25T16:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842210#M60179</link>
      <description>Tim, I don't see the error. What is it?&lt;BR /&gt;</description>
      <pubDate>Sat, 25 Aug 2007 19:39:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842210#M60179</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-08-25T19:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842211#M60180</link>
      <description>On my screen, it shows if(v=0.) ....&lt;BR /&gt;where if(v == 0.) ...&lt;BR /&gt;might have been meant.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 26 Aug 2007 04:59:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842211#M60180</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2007-08-26T04:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842212#M60181</link>
      <description>Good eyes! However, I am pretty sure that this is a "representation" and not the actual code. An easy typo to make (I've done that myself too many times.) You're right that in Fortran this would be a syntax error and in C a different meaning.&lt;BR /&gt;</description>
      <pubDate>Sun, 26 Aug 2007 15:30:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842212#M60181</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-08-26T15:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842213#M60182</link>
      <description>&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Verdana"&gt;Logical quantity b is &lt;U&gt;undefined&lt;/U&gt; (defaults to .FALSE.?) in the code as written.&lt;BR /&gt;&lt;BR /&gt;Perhaps line 6 should read&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;FONT face="Courier New"&gt; b = (v /= 0.)&lt;/FONT&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;which always explicitly assigns the value of b.&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Sun, 26 Aug 2007 17:08:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842213#M60182</guid>
      <dc:creator>Paul_Curtis</dc:creator>
      <dc:date>2007-08-26T17:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842214#M60183</link>
      <description>True enough, though if the code shown is an accurate representation, b should be set to .FALSE. because v is zero. There is no default initialization here. My guess is that the actual code does something different.&lt;BR /&gt;</description>
      <pubDate>Sun, 26 Aug 2007 20:54:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842214#M60183</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-08-26T20:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842215#M60184</link>
      <description>&lt;P&gt;Thanks, folks, for your attention to this.&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;Sorry to have put you all to such trouble.&lt;/P&gt;
&lt;P&gt;In following Steve's initial "homework assignment" to create and submit a complete test case, I found the error -- one which I do believe&lt;B style="mso-bidi-font-weight: normal"&gt; should have been caught by the compiler&lt;/B&gt;.&lt;/P&gt;
&lt;P&gt;Steve correctly recognized the bad paraphrase with the = rather than ==, and my paraphrasing of the problem area of the program was definitely incomplete.&lt;/P&gt;
&lt;P&gt;It turns out that what caused the error -- even though I have called for the compiler to &lt;STRONG&gt;treat all warnings as errors&lt;/STRONG&gt; -- was a &lt;B style="mso-bidi-font-weight: normal"&gt;duplicate specification of one of the logical variables&lt;/B&gt;.&lt;/P&gt;
&lt;P&gt;A true extract of thesubroutine is shown below:&lt;/P&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;SUBROUTINE lngvalv [from .f90]
! -- removed from the CONTAINS in the subroutine which now calls
!&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;this one because the IVF interface to Visual Studio does not
!&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;permit debugging of the containER variables when in the
!&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;containED portion of the source file&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;use mlimits
 [which is as follows from .for:
 module mLimits
 integer(4), parameter ::
 &amp;amp;maxsecno=20000
 &amp;amp;,maxvalv=300
 ....
 end module mLimits]&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;use mValpc
 [which is as follows from .for:
 module mValpc
 use mLimits&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; COMMON/VALPC/T01(21,maxvalv),S01(21,maxvalv),STK(21,maxvalv)
 &amp;amp; ,COD(21,maxvalv),TQ,VALDIM(maxvalv)
 1 ,COEF,NCRV1(maxvalv),NCRV2(maxvalv) ,KKK,SX,ITIM,ISTK
 &amp;amp;,THETO(maxvalv),
 2 THETS(maxvalv),DELH,IOPG(maxvalv),TV(maxvalv),ICHKV(maxvalv)
 &amp;amp;,CDN(21,maxvalv),VVN(maxvalv),NCV2&lt;BR /&gt; save /valpc/&lt;BR /&gt; end module mValpc ]&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;use mvalvlng
 [which is as follows from .for:
 module mValvLNG
 use mLimits
 DOUBLE PRECISION BB,CC,C1R,C1S,C3,C4,TA,TA2
 1 ,vv,vu,vd,pvv,voidu,voidd,hvvap,hu,hd,hv&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt; logical undecided,separate&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt; common/ValvLNG/bb,cc,ta,ta2,c3,c1r,c4,c1s,vu,vd
 1,vv,pvv,voidu,voidd,hvvap,hu,hd,hhv,tjlngmax
 1,i7,ii7,L7,LL7,iop9,jlngmax,idin,kk,undecided,&lt;STRONG&gt;&lt;U&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;separate&lt;/SPAN&gt;&lt;/U&gt;&lt;/STRONG&gt;(maxvalv)
 1,i1,i2,i3,i4,i5
 1,ii7vs,i7vs&lt;BR /&gt; save /ValvLNG/&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;&amp;amp;nbs
p; end module mValvLNG]&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;LOGICAL :: upst,dnst,joined,&lt;STRONG&gt;&lt;U&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;separate&lt;/SPAN&gt;&lt;/U&gt;&lt;/STRONG&gt;(kkk),previouslyseparated&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;joined=.true.&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;previouslyseparated=separate(kkk)&lt;BR /&gt;
separate(kkk)=.false.&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;if(joined .AND. previouslyseparated)then&lt;BR /&gt; [divide by zero] &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;else&lt;BR /&gt; [use another relationship]&lt;BR /&gt;endif&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="FONT-SIZE: 13.5pt; FONT-FAMILY: 'Times New Roman'"&gt;You'llnotice that the highlighted&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;LOGICAL "&lt;I style="mso-bidi-font-style: normal"&gt;separate&lt;/I&gt;" is specified both
in the module &lt;I style="mso-bidi-font-style: normal"&gt;mvalvlng&lt;/I&gt; and in the subroutine itself -- the accidental 
result of an unthinking Copy/Paste.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="FONT-SIZE: 13.5pt; FONT-FAMILY: 'Times New Roman'"&gt;The only hint of trouble came when run-time stopped me with a divide-
by-zero at the line I've flagged with &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-SIZE: 13.5pt"&gt;&lt;FONT face="Times New Roman"&gt;Question 1:&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;Would this error have been caught had I used the&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 13.5pt; FONT-FAMILY: 'Times New Roman'"&gt;
&lt;STRONG&gt;old-fashioned INCLUDE-a-source-file rather than the &lt;I style="mso-bidi-font-style: normal"&gt;de rigueur&lt;/I&gt;
USE-a-module to get my variables specified?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="FONT-SIZE: 13.5pt; FONT-FAMILY: 'Times New Roman'"&gt;I suspect this would have been caught had I been able to follow Steve's
earlier advice to run the Static Verification.  But all that does is bomb
out -- without any &lt;EM&gt;'scuse me's&lt;/EM&gt; at all! -- after trying to grab more RAM
than the IA-32 system has available. &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="FONT-SIZE: 13.5pt; FONT-FAMILY: 'Times New Roman'"&gt;This last problem I have reported to Intel Premier Support, only to be
politely advised by Xiaoping Duan, &lt;T&gt;here has already been a known
report on huge memory usage by SV leading to out of memory. The main &lt;BR /&gt;reason is that we keep info in memory for all routines simultaneously.
Keeping unneeded info results in 'out of memory' error. The developers
&lt;/T&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 15pt; FONT-FAMILY: 'Times New Roman'"&gt;have already fixed it &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 13.5pt; FONT-FAMILY: 'Times New Roman'"&gt;and the fix will be available in future 10.1 update.
I will associate your problem report to the existing bug report and let
you know when the new compiler containing the fix is available.
[Emphasis added.] &lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-SIZE: 13.5pt"&gt;Question 2:&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;When will 10.1 be available?&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;Even a Beta would be lots&lt;BR /&gt;better than flying blind like this!&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-SIZE: 13.5pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-SIZE: 13.5pt"&gt;Quest
ion 3:&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;When, oh when, are They going to fix this Message &lt;BR /&gt;dialog so that you can force it to return to automatic word-wrap &lt;BR /&gt;after pasting code??!!&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 13.5pt; mso-bidi-font-weight: bold"&gt;Shift-Return is not one of my favorite &lt;BR /&gt;punctuation marks!&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 13.5pt; mso-bidi-font-weight: bold"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 13.5pt; mso-bidi-font-weight: bold"&gt;&lt;STRONG&gt;Question 4: When are "They" going to make this Message dialog &lt;BR /&gt;the same width as the Thread presentation window??!!&lt;/STRONG&gt; Sliding &lt;BR /&gt;the window from right to left is not my favorite way to read things!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 13.5pt; mso-bidi-font-weight: bold"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 13.5pt; mso-bidi-font-weight: bold"&gt;Thanks again to all, and of course, God bless!&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;STRONG&gt;&lt;SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 13.5pt; mso-bidi-font-weight: bold"&gt;Jack OSullivan&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 13.5pt"&gt;&lt;BR style="mso-special-character: line-break" /&gt;&lt;BR style="mso-special-character: line-break" /&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2007 14:58:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842215#M60184</guid>
      <dc:creator>jackosullivan1</dc:creator>
      <dc:date>2007-08-27T14:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842216#M60185</link>
      <description>Unfortunately, the mistake you made is perfectly legal Fortran so the compiler could not "catch" it. Uninitialized variable checking might have found it. &lt;BR /&gt;&lt;BR /&gt;I'm glad to hear that you solved the problem. (Note - it was Tim who spotted the = typo.)&lt;BR /&gt;&lt;BR /&gt;This is another illustration of the confusion caused by paraphrasing the code - in almost all cases the actual error is in code you did not show.&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Aug 2007 15:17:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842216#M60185</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-08-27T15:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842217#M60186</link>
      <description>&lt;P&gt;Steve,&lt;/P&gt;
&lt;P&gt;If this is "perfectly legal Fortran", how is it that during a debug session I would get the divide by zero when the values of &lt;EM&gt;joined &lt;/EM&gt;and &lt;EM&gt;previouslyseparated&lt;/EM&gt; are revealed via cursor hovering to be .TRUE. and .FALSE. respectively, and the hover-revealed value of "(joined.and.previouslyseparated)" shows as .FALSE.?&lt;/P&gt;
&lt;P&gt;The parentheses served as a proper gate, preventing the divide-by-zero as soon as I removed &lt;EM&gt;separate(kkk)&lt;/EM&gt; from the LOGICAL statement.&lt;/P&gt;
&lt;P&gt;Thanks again, asnd God bless!&lt;/P&gt;
&lt;P&gt;Jack&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2007 15:38:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842217#M60186</guid>
      <dc:creator>jackosullivan1</dc:creator>
      <dc:date>2007-08-27T15:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842218#M60187</link>
      <description>Upon rereading your expanded code, I'm still not quite certain of what the problem was. Ignore my comment about "perfectly legal". If you have a locally declared name that is the same as a USE-associated name, the compiler will complain. If I saw the whole application, I might then understand the issue and perhaps be able to explain it.&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Aug 2007 16:05:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842218#M60187</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-08-27T16:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842219#M60188</link>
      <description>&lt;P&gt;Steve,&lt;/P&gt;
&lt;P&gt;I have created a short version that makes the same errors:&lt;/P&gt;
&lt;P&gt;1) It does not catch the local plus common/module specification.&lt;/P&gt;
&lt;P&gt;2) It does not treat the "a.and.b" as false when its contents are ".true..and..false."&lt;/P&gt;
&lt;P&gt;It's a bit long to put here -- 65 lines or so in 5 source files -- so I will submit it to Premier Support.&lt;/P&gt;
&lt;P&gt;Thanks and God bless!&lt;/P&gt;
&lt;P&gt;Jack&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2007 20:59:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842219#M60188</guid>
      <dc:creator>jackosullivan1</dc:creator>
      <dc:date>2007-08-27T20:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842220#M60189</link>
      <description>&lt;P&gt;Just a small item tonote : (may not be relevant in this instance but just in case it is)&lt;/P&gt;
&lt;P&gt;In the first sample code there is if (v==0)&lt;/P&gt;
&lt;P&gt;If "v" in the actual codeisReal and is the result of a calculation then it may not be exactly zero. Tests for equalitywith real/double precision variablesshould be avoided and a tolerance used instead.&lt;/P&gt;
&lt;P&gt;Les&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2007 13:37:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842220#M60189</guid>
      <dc:creator>Les_Neilson</dc:creator>
      <dc:date>2007-08-28T13:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842221#M60190</link>
      <description>Jack,&lt;BR /&gt;&lt;BR /&gt;Thanks so much for sending the test program AND your build settings. These were critical to understanding the problems.&lt;BR /&gt;&lt;BR /&gt;First, you are absolutely correct - the compiler should have complained about the duplicate declaration of "separate". It turns out that it does so in most cases, but not when the variable is declared as part of a COMMON in the module. We'll fix that.&lt;BR /&gt;&lt;BR /&gt;The second issue is more interesting and requires your having set /fpscomp:logicals. In the test program, logical variable b is set to an unpredictable value because the local array separate is uninitialized. In the case in question, the value it gets (in my test run) is Z'0040105A'. Because /fpscomp:logicals was set, any non-zero value is TRUE, but the debugger is assuming the default logical semantics where even values (low bit clear) are false, so it displayed the value as .FALSE. even though the code treated it as .TRUE..&lt;BR /&gt;&lt;BR /&gt;I'm not sure how we'll address this second problem - there isn't currently a mechanism to inform the debugger that /fpscomp:logicals was used. There's a couple of possibilities I've thought of and we'll try to figure out a solution for the future.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Aug 2007 15:01:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842221#M60190</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-08-28T15:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842222#M60191</link>
      <description>&lt;P&gt;Jack,&lt;/P&gt;
&lt;P&gt;I believe what you are experiencing is a problem of (feature of) name space (scope)and as a result uninitialized variables being used.&lt;/P&gt;&lt;PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;module mValvLNG
...
  &lt;/FONT&gt;&lt;FONT size="2"&gt;logical ...,separate&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;! named common block   ValvLNK::separate&lt;BR /&gt;! not module name     mValvLNG::separate&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;common/ValvLNG/...&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt; ...,&lt;STRONG&gt;&lt;U&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;separate&lt;/SPAN&gt;&lt;/U&gt;&lt;/STRONG&gt;(maxvalv)
 ...&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt; save /ValvLNG/&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;end module mValvLNG]&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;...&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;(your subroutine/funciton)&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;use mValvLNG&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;...&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;! stack local (subprogram scope) separate&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;LOGICAL :: ...,&lt;STRONG&gt;&lt;U&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;separate&lt;/SPAN&gt;&lt;/U&gt;&lt;/STRONG&gt;(kkk),previouslyseparated&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;joined=.true.&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;! using uninitialized stack local&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;previouslyseparated=separate(kkk)&lt;BR /&gt;
separate(kkk)=.false.&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;....&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;! previouslyseparated contains copy of uninitialized data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;if(joined .AND. previouslyseparated)then&lt;BR /&gt; [divide by zero] &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;else&lt;BR /&gt; [use another relationship]&lt;BR /&gt;endif&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;/PRE&gt;
&lt;P&gt;I believe this qualifies as a nested scoping situation where it is valid to re-use the name to declare a different data area of the same name for use for different purpose.&lt;/P&gt;
&lt;P&gt;I haven't tried it but I think if the module contained non-COMMON variables that the compiler error you sought would have occured.&lt;/P&gt;
&lt;P&gt;Experiment byadding&lt;/P&gt;
&lt;P&gt; logical :: separateFOO(maxvalv)&lt;/P&gt;
&lt;P&gt;to module mValvLNG on a line by itself and without also being declared in a COMMON&lt;/P&gt;
&lt;P&gt;Then in your program where the problem occured insert&lt;/P&gt;
&lt;P&gt; logical :: separateFOO(kkk)&lt;/P&gt;
&lt;P&gt;immediately following the logical that declared the local copy of separate.&lt;/P&gt;
&lt;P&gt;When you compile I think you will see the error message that you were expecting.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2007 15:26:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842222#M60191</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2007-08-28T15:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842223#M60192</link>
      <description>Jim,&lt;BR /&gt;&lt;BR /&gt;Fortran does not allow the sort of nested scoping you describe. As I posted above, it is a compiler bug that it does not detect the error when the use-inherited name is a COMMON variable.&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Aug 2007 15:33:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842223#M60192</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-08-28T15:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842224#M60193</link>
      <description>&lt;P&gt;Steve,&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt; It turns out that it does so in most cases, but not when the variable is declared as part of a COMMON in the module. We'll fix that.&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;In this particular case it is a &lt;FONT color="#ff0000"&gt;named &lt;/FONT&gt;COMMON block (a seperate scoping unit). I believe it should not be fixed as you would be breaking an F90 standard regarding scoping. Before you put this in for a fix check what the standards committee suggested regarding this situation.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2007 15:36:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842224#M60193</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2007-08-28T15:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842225#M60194</link>
      <description>&lt;P&gt;Jim ... and everyone else who has joined into this ... &lt;/P&gt;
&lt;P&gt;Thanks so much for taking the time and effort to guide this poor ol' hydraulic engineer in the ways and foibles of Fortran. This site truly has the correct name: software&lt;STRONG&gt;community&lt;/STRONG&gt;!&lt;/P&gt;
&lt;P&gt;Steve,&lt;/P&gt;
&lt;P&gt;Thanks in particular for your speedy attention to this problem. &lt;/P&gt;
&lt;P&gt;Perhaps while you are working on making COMMONvariables visible to the compiler's error-trapper, you might find a way to make the Go To Definition right-click function in MS Visual Studio actually do that for IVF?&lt;/P&gt;
&lt;P&gt;Also, any idea of when 10.1 is coming out? I could sure use that Static Verification!&lt;/P&gt;
&lt;P&gt;All,&lt;/P&gt;
&lt;P&gt;Thanks again so much, and of course, God bless!&lt;/P&gt;
&lt;P&gt;Jack&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2007 15:51:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842225#M60194</guid>
      <dc:creator>jackosullivan1</dc:creator>
      <dc:date>2007-08-28T15:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Logical .AND. Operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842226#M60195</link>
      <description>Jack, I noticed that formatted and list-directed I/O will also assume the default interpretation and not honor /fpscomp:logicals. We're discussing this - one option may be to simply say that /fpscomp:logicals affects how logical tests are done computationally but not display of values.&lt;BR /&gt;&lt;BR /&gt;Jim, my reading of the Fortran 2003 standard makes it clear that the standard does not allow this. Do you have something that shows otherwise?&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Aug 2007 16:04:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-with-Logical-AND-Operator/m-p/842226#M60195</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-08-28T16:04:26Z</dc:date>
    </item>
  </channel>
</rss>

