<?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 Thanks for that Steve. It is in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055432#M116260</link>
    <description>&lt;P&gt;Thanks for that Steve. It is good to have recognition that something may be awry in the standard rather than a bad implementation.&lt;/P&gt;

&lt;P&gt;On line 39 of my code where I do a vector subtract, does the compiler know that the two vectors are the same size ? Is it able to optimize the vector operation without this information ? Did the standards committee anticipate this problem?&lt;/P&gt;

&lt;P&gt;If it is OK for the declaration of a return value or local variable to reference the length of a dummy argument (and I see no other way to declare them), then why can't dummy arguments do the same so that b could reference a and only a would have assumed length. The compiler needs to recognize the chain of "assumedness" for both these cases. In cases where arguments have matched lengths then the compiler should also check that actual arguments do have matching lengths.&lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2015 07:20:50 GMT</pubDate>
    <dc:creator>Andrew_Smith</dc:creator>
    <dc:date>2015-05-08T07:20:50Z</dc:date>
    <item>
      <title>Compiler errors with parameterized types using defined assignment and - operator</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055429#M116257</link>
      <description>&lt;PRE class="brush:fortran;"&gt;module TestParamTypeMod
   integer, parameter :: DP =  SELECTED_REAL_KIND(13)
   
   type DoubleDif(n)
      integer, len :: n
      real(DP) :: v
      real(DP) :: d(n)
   end type
   
   interface assignment(=)
      module procedure ass_D_Dpdif, ass_Dpdif_Dpdif
   end interface
   
   interface operator(-)
      module procedure sub_Dpdif_Dpdif
   end interface
   
contains

pure elemental subroutine ass_D_Dpdif(b, a)
   real(DP), intent(in) :: a
   type(DoubleDif(*)), intent(inout) :: b
   b%v = a
   b%d = 0.0_DP
end subroutine

pure subroutine ass_Dpdif_Dpdif(b, a)
   type(DoubleDif(*)), intent(inout) :: b
   type(DoubleDif(*)), intent(in) :: a
   b%v = a%v
   b%d = a%d
end subroutine

pure function sub_Dpdif_Dpdif(a, b) result(c)
   type(DoubleDif(*)), intent(in) :: a
   type(DoubleDif(*)), intent(in) :: b
   type(DoubleDif(a%n)) c
   c%v = a%v - b%v
   c%d = a%d - b%d
end function

end module

program Test
   use TestParamTypeMod
   type(DoubleDif(1)) a, b, c
   
   a = 2.0_DP
   b = 1.0_DP
   b%d = 3.0_DP
   call ass_Dpdif_Dpdif(c, b - a)
   c = b - a
   print *, c%v, c%d
end program&lt;/PRE&gt;

&lt;P&gt;This gives errors:&lt;/P&gt;

&lt;P&gt;Compiling with Intel(R) Visual Fortran Compiler XE 15.0.3.208 [Intel(R) 64]...&lt;BR /&gt;
	TestParamType.f90&lt;BR /&gt;
	D:\dev\TestParamType.f90(51): error #6633: The type of the actual argument differs from the type of the dummy argument.&lt;BR /&gt;
	D:\dev\TestParamType.f90(52): error #6197: An assignment of different structure types is invalid.&lt;BR /&gt;
	ifort: error #10298: problem during post processing of parallel object compilation&lt;BR /&gt;
	compilation aborted for D:\dev\TestParamType.f90 (code 1)&lt;/P&gt;

&lt;P&gt;Is my code f2008 compliant and / or is it compiler errors ?&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 21:40:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055429#M116257</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2015-05-06T21:40:50Z</dc:date>
    </item>
    <item>
      <title>I'll look into this and see</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055430#M116258</link>
      <description>&lt;P&gt;I'll look into this and see what's up. This sounds vaguely familiar....&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2015 00:24:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055430#M116258</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-05-07T00:24:23Z</dc:date>
    </item>
    <item>
      <title>Yes, it is familiar because</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055431#M116259</link>
      <description>&lt;P&gt;Yes, it is familiar because this question got asked not too long ago.&lt;/P&gt;

&lt;P&gt;The problem here is the result type of sub_Dpdif_Dpdif, which is DoubleDif(a%n) where a is one of the dummy arguments. This is a specification expression, which is fine as it is, but our compiler thinks it isn't "consistent" with a dummy argument that has an assumed length parameter. I have a feeling that the compiler is not correct here, but am having trouble finding words to say so. I have asked other standards committee members for advice and will let you know what comes out of this.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2015 19:47:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055431#M116259</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-05-07T19:47:20Z</dc:date>
    </item>
    <item>
      <title>Thanks for that Steve. It is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055432#M116260</link>
      <description>&lt;P&gt;Thanks for that Steve. It is good to have recognition that something may be awry in the standard rather than a bad implementation.&lt;/P&gt;

&lt;P&gt;On line 39 of my code where I do a vector subtract, does the compiler know that the two vectors are the same size ? Is it able to optimize the vector operation without this information ? Did the standards committee anticipate this problem?&lt;/P&gt;

&lt;P&gt;If it is OK for the declaration of a return value or local variable to reference the length of a dummy argument (and I see no other way to declare them), then why can't dummy arguments do the same so that b could reference a and only a would have assumed length. The compiler needs to recognize the chain of "assumedness" for both these cases. In cases where arguments have matched lengths then the compiler should also check that actual arguments do have matching lengths.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 07:20:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055432#M116260</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2015-05-08T07:20:50Z</dc:date>
    </item>
    <item>
      <title>From what my fellow standards</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055433#M116261</link>
      <description>&lt;P&gt;From what my fellow standards people tell me, your code is correct and should work. I will report this as a bug to our developers. Issue ID is&amp;nbsp;DPD200370162.&lt;/P&gt;

&lt;P&gt;We assume that the shapes match, as required by the standard, so I would expect vectorization if the compiler thinks it profitable. You can turn on optimization reports and see what it says.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 18:14:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055433#M116261</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-05-08T18:14:00Z</dc:date>
    </item>
    <item>
      <title>Hi Steve and Andrew,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055434#M116262</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Hi Steve and Andrew,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I am working on what appears to be the same application presented here and happened upon the same error. &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;error #6197: An assignment of different structure types is invalid.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Are either of you aware of a work around for this issue? Maybe a different definition for the overloaded operator that would better inform the compiler for the time being?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 23:42:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055434#M116262</guid>
      <dc:creator>Wukie__Nathan</dc:creator>
      <dc:date>2015-05-18T23:42:44Z</dc:date>
    </item>
    <item>
      <title>There is no workaround</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055435#M116263</link>
      <description>&lt;P&gt;There is no workaround&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2015 11:58:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055435#M116263</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2015-05-19T11:58:04Z</dc:date>
    </item>
    <item>
      <title>It may not be the same</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055436#M116264</link>
      <description>&lt;P&gt;It may not be the same problem, even if the diagnostic is the same. Can you provide us with a small test case?&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 13:27:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055436#M116264</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-05-29T13:27:30Z</dc:date>
    </item>
    <item>
      <title>Andrew's issue is expected to</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055437#M116265</link>
      <description>&lt;P&gt;Andrew's issue is expected to be fixed in 16.0.1 (2016 Update 1).&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 16:38:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-errors-with-parameterized-types-using-defined/m-p/1055437#M116265</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-11-05T16:38:02Z</dc:date>
    </item>
  </channel>
</rss>

