<?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:Problem with C_F_POINTER and the LOWER argument in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1591534#M171896</link>
    <description>&lt;P&gt;Good news! The Fortran compiler team got right on this! Look for the fix in the 2024.2 release planned for mid-2024.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 22 Apr 2024 18:35:09 GMT</pubDate>
    <dc:creator>Barbara_P_Intel</dc:creator>
    <dc:date>2024-04-22T18:35:09Z</dc:date>
    <item>
      <title>Problem with C_F_POINTER and the LOWER argument</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1587303#M171673</link>
      <description>&lt;P&gt;In the most recent compiler the C_F_POINTER function accepts the LOWER argument . I have used it, but I see that someting is wrong. The shape of the result is not equal to the shape as it was supplied when calling the function. I add a small example. Is this a compiler bug or do I miss something?&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 10:31:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1587303#M171673</guid>
      <dc:creator>Robert_van_Amerongen</dc:creator>
      <dc:date>2024-04-08T10:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with C_F_POINTER and the LOWER argument</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1587384#M171676</link>
      <description>&lt;P&gt;It is a bug.&lt;/P&gt;&lt;P&gt;Intel Support team, this might be an issue with a naive implementation of the latest Fortran 2023 feature without any validation checking.&amp;nbsp; It appears the upper bound of the result pointer that shall be an object defined by means of a Fortran processor gets set to -1 by Intel Fortran when lower bound is specified. Perhaps the Intel Fortran team will be interested in using another test case below?&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;   use, intrinsic :: iso_c_binding, only : c_loc, c_f_pointer
   blk1: block
      character(len=:), allocatable, target :: x(:)
      character(len=:), pointer :: y(:)
      print *, "Block 1: intrinsic type character"
      x = [ character(len=4) :: "How", "are", "you?" ]
      call c_f_pointer( cptr=c_loc(x), fptr=y, shape=shape(x), lower=[ -1 ] )
      print *, "lbound(y): ", lbound(y, dim=1), "; expected is -1"
      print *, "ubound(y): ", ubound(y, dim=1), "; expected is 1"
      print *, "y = ", y
   end block blk1
   print *
   blk2: block
      integer, target :: x(5)
      integer, pointer :: y(:)
      print *, "Block 2: intrinsic type integer"
      x = [ 1, 2, 3, 4, 5 ]
      call c_f_pointer( cptr=c_loc(x), fptr=y, shape=shape(x), lower=[ -2 ] )
      print *, "lbound(y): ", lbound(y, dim=1), "; expected is -2"
      print *, "ubound(y): ", ubound(y, dim=1), "; expected is 2"
      print *, "y = ", y
   end block blk2
   print *
   blk3: block
      real, target :: x(7)
      real, pointer :: y(:)
      print *, "Block 3: intrinsic type real"
      x = [( real(i), integer :: i = 1, size(x) )]
      call c_f_pointer( cptr=c_loc(x), fptr=y, shape=shape(x), lower=[ -3 ] )
      print *, "lbound(y): ", lbound(y, dim=1), "; expected is -3"
      print *, "ubound(y): ", ubound(y, dim=1), "; expected is 3"
      print *, "y = ", y
   end block blk3
end&lt;/LI-CODE&gt;&lt;LI-CODE lang="none"&gt;C:\Temp&amp;gt;ifx /standard-semantics /free p.f
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.1.0 Build 20240308
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.

Microsoft (R) Incremental Linker Version 14.36.32537.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:p.exe
-subsystem:console
p.obj

C:\Temp&amp;gt;p.exe
 Block 1: intrinsic type character
 lbound(y):  -1 ; expected is -1
 ubound(y):  -1 ; expected is 1
 y =

 Block 2: intrinsic type integer
 lbound(y):  -2 ; expected is -2
 ubound(y):  -1 ; expected is 2
 y =  1 2

 Block 3: intrinsic type real
 lbound(y):  -3 ; expected is -3
 ubound(y):  -1 ; expected is 3
 y =  1.000000 2.000000 3.000000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 15:00:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1587384#M171676</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2024-04-08T15:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with C_F_POINTER and the LOWER argument</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1588138#M171737</link>
      <description>&lt;P&gt;Thank you for reporting this,@Robert_van_Amerongen. Thanks, too, for the small reproducer.&lt;/P&gt;
&lt;P&gt;Thank you, &lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/92920"&gt;@FortranFan&lt;/a&gt;, for another reproducer! The Fortran compiler engineers appreciate that!&lt;/P&gt;
&lt;P&gt;I file a bug report, CMPLRLLVM-57611, and included both reproducers. We'll let you know its progress to a fix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 22:25:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1588138#M171737</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2024-04-10T22:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with C_F_POINTER and the LOWER argument</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1588271#M171744</link>
      <description>&lt;P&gt;Barbara and FortranFan,&lt;/P&gt;&lt;P&gt;thanks for your help.&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 08:40:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1588271#M171744</guid>
      <dc:creator>Robert_van_Amerongen</dc:creator>
      <dc:date>2024-04-11T08:40:02Z</dc:date>
    </item>
    <item>
      <title>Re:Problem with C_F_POINTER and the LOWER argument</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1591534#M171896</link>
      <description>&lt;P&gt;Good news! The Fortran compiler team got right on this! Look for the fix in the 2024.2 release planned for mid-2024.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Apr 2024 18:35:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1591534#M171896</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2024-04-22T18:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Problem with C_F_POINTER and the LOWER argument</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1591934#M171911</link>
      <description>&lt;P&gt;That is nice to read.&lt;/P&gt;&lt;P&gt;Tanks to te team.&lt;/P&gt;&lt;P&gt;And for you to let me know.&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 17:11:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-C-F-POINTER-and-the-LOWER-argument/m-p/1591934#M171911</guid>
      <dc:creator>Robert_van_Amerongen</dc:creator>
      <dc:date>2024-04-23T17:11:20Z</dc:date>
    </item>
  </channel>
</rss>

