<?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 Segfault with procedure argument when -g supplied in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segfault-with-procedure-argument-when-g-supplied/m-p/1578620#M171199</link>
    <description>&lt;P&gt;I've run into a bug with the latest version of ifx (2024.0.2 on Arch Linux). I'm getting a segfault with the following simple program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;program main

  implicit none

  abstract interface
    subroutine proc_t()
    end subroutine proc_t
  end interface

  integer :: i

  i = 1
  call run(a)

contains

  subroutine a()
    print *, i
  end subroutine a

  subroutine run(proc)
    procedure(proc_t) :: proc
    call proc
  end subroutine run

end program main&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The segfault occurs only when I compile with -g:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ ifx main.F90 &amp;amp;&amp;amp; ./a.out
           1
$ ifx -g main.F90 &amp;amp;&amp;amp; ./a.out
ifx: remark #10440: Note that use of a debug option without any optimization-level option will turnoff most compiler optimizations similar to use of '-O0'
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source
libc.so.6          00001316EBF25770  Unknown               Unknown  Unknown
Unknown            00007FFD21434938  Unknown               Unknown  Unknown&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2024 18:06:41 GMT</pubDate>
    <dc:creator>zjibben</dc:creator>
    <dc:date>2024-03-07T18:06:41Z</dc:date>
    <item>
      <title>Segfault with procedure argument when -g supplied</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segfault-with-procedure-argument-when-g-supplied/m-p/1578620#M171199</link>
      <description>&lt;P&gt;I've run into a bug with the latest version of ifx (2024.0.2 on Arch Linux). I'm getting a segfault with the following simple program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;program main

  implicit none

  abstract interface
    subroutine proc_t()
    end subroutine proc_t
  end interface

  integer :: i

  i = 1
  call run(a)

contains

  subroutine a()
    print *, i
  end subroutine a

  subroutine run(proc)
    procedure(proc_t) :: proc
    call proc
  end subroutine run

end program main&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The segfault occurs only when I compile with -g:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ ifx main.F90 &amp;amp;&amp;amp; ./a.out
           1
$ ifx -g main.F90 &amp;amp;&amp;amp; ./a.out
ifx: remark #10440: Note that use of a debug option without any optimization-level option will turnoff most compiler optimizations similar to use of '-O0'
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source
libc.so.6          00001316EBF25770  Unknown               Unknown  Unknown
Unknown            00007FFD21434938  Unknown               Unknown  Unknown&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 18:06:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Segfault-with-procedure-argument-when-g-supplied/m-p/1578620#M171199</guid>
      <dc:creator>zjibben</dc:creator>
      <dc:date>2024-03-07T18:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Segfault with procedure argument when -g supplied</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segfault-with-procedure-argument-when-g-supplied/m-p/1578668#M171207</link>
      <description>&lt;P&gt;Nice reproducer. Unfortunately, I cannot duplicate the segfault on Fedora 38 or Ubuntu 22.04.3.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arch Linux is not supported by Intel.&lt;/P&gt;
&lt;P&gt;What version of GCC is installed?&amp;nbsp; gcc --version&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 22:29:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Segfault-with-procedure-argument-when-g-supplied/m-p/1578668#M171207</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2024-03-07T22:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Segfault with procedure argument when -g supplied</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segfault-with-procedure-argument-when-g-supplied/m-p/1578669#M171208</link>
      <description>&lt;P&gt;Oh interesting, maybe it's my system then. My gcc reports 13.2.1 20230801.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just tried on a cluster with ifx 2023.1.0, running what seems like SUSE enterprise linux 15 with gcc 7.5.0. No error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll see if I can get my hands on anything else.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 22:38:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Segfault-with-procedure-argument-when-g-supplied/m-p/1578669#M171208</guid>
      <dc:creator>zjibben</dc:creator>
      <dc:date>2024-03-07T22:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Segfault with procedure argument when -g supplied</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segfault-with-procedure-argument-when-g-supplied/m-p/1579007#M171219</link>
      <description>&lt;P&gt;Alright, I managed to get my hands on a couple more systems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fedora 39, up to date with glibc 2.38, does not reproduce this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However Fedora Rawhide, up to date with glibc 2.39 (same as my Arch system), does reproduce the error. I also discovered that it's sufficient to only specify -O0 (-g isn't needed).&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 20:08:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Segfault-with-procedure-argument-when-g-supplied/m-p/1579007#M171219</guid>
      <dc:creator>zjibben</dc:creator>
      <dc:date>2024-03-08T20:08:32Z</dc:date>
    </item>
  </channel>
</rss>

