<?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 access violation with unlimited polymorphic function in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/access-violation-with-unlimited-polymorphic-function/m-p/791056#M32664</link>
    <description>Yes, that does seem to be the case. "13.0" is the next major release, due out later this year.</description>
    <pubDate>Tue, 03 Jul 2012 13:18:53 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2012-07-03T13:18:53Z</dc:date>
    <item>
      <title>access violation with unlimited polymorphic function</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/access-violation-with-unlimited-polymorphic-function/m-p/791054#M32662</link>
      <description>when I run the following test case, which is the smallest one I can provide,&lt;BR /&gt;&lt;BR /&gt;[fortran]module mtest
    contains
     function to_str(obj) result( s )
        character(:),allocatable :: s
        class(*) :: obj
        integer :: j
        character(len=100) :: temp

        select type(obj)
            type is (integer(4))
                j = obj
                write(temp, fmt="(i0)") j
         end select
        s = trim(temp)
    end function
end module 
program test
    use mtest

    print *, "i:", to_str(5)
    print *, "i:" // to_str(5)
    
end program [/fortran]&lt;BR /&gt;I get an access violation on the second print statement:&lt;BR /&gt;&lt;BR /&gt;[bash]C:\TEMP&amp;gt;ifort test.f90
Intel Visual Fortran Compiler XE for applications running on IA-32, Version 12.1.4.325 Build 20120410
Copyright (C) 1985-2012 Intel Corporation.  All rights reserved.

Microsoft  Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:test.exe
-subsystem:console
test.obj

C:\TEMP&amp;gt;test
 i:5
forrtl: severe (157): Program Exception - access violation
Image              PC        Routine            Line        Source
test.exe           00409E79  Unknown               Unknown  Unknown
test.exe           00401305  Unknown               Unknown  Unknown
test.exe           0044F2A3  Unknown               Unknown  Unknown
test.exe           0043524F  Unknown               Unknown  Unknown
kernel32.dll       7C817067  Unknown               Unknown  Unknown

C:\TEMP&amp;gt;[/bash]&lt;BR /&gt;If instead of making the result of the function allocatable, I make it a fixed lenght string, there is no problem.&lt;BR /&gt;&lt;BR /&gt;Johny</description>
      <pubDate>Tue, 03 Jul 2012 07:13:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/access-violation-with-unlimited-polymorphic-function/m-p/791054#M32662</guid>
      <dc:creator>johnyb_</dc:creator>
      <dc:date>2012-07-03T07:13:48Z</dc:date>
    </item>
    <item>
      <title>access violation with unlimited polymorphic function</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/access-violation-with-unlimited-polymorphic-function/m-p/791055#M32663</link>
      <description>This problem appears to have been corrected in ifort 13.0, although I see it in 12.1.5.</description>
      <pubDate>Tue, 03 Jul 2012 10:35:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/access-violation-with-unlimited-polymorphic-function/m-p/791055#M32663</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-07-03T10:35:22Z</dc:date>
    </item>
    <item>
      <title>access violation with unlimited polymorphic function</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/access-violation-with-unlimited-polymorphic-function/m-p/791056#M32664</link>
      <description>Yes, that does seem to be the case. "13.0" is the next major release, due out later this year.</description>
      <pubDate>Tue, 03 Jul 2012 13:18:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/access-violation-with-unlimited-polymorphic-function/m-p/791056#M32664</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-07-03T13:18:53Z</dc:date>
    </item>
    <item>
      <title>access violation with unlimited polymorphic function</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/access-violation-with-unlimited-polymorphic-function/m-p/791057#M32665</link>
      <description>&lt;P&gt;Tim, Steve,&lt;BR /&gt;thanks for your answers.&lt;BR /&gt;I can work around the bug for the moment, so I can wait for the next major version. I think our support runs 'til then&lt;BR /&gt;&lt;BR /&gt;Johny&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jul 2012 14:10:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/access-violation-with-unlimited-polymorphic-function/m-p/791057#M32665</guid>
      <dc:creator>johnyb_</dc:creator>
      <dc:date>2012-07-04T14:10:50Z</dc:date>
    </item>
  </channel>
</rss>

