Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28561 Discussions

Internal compiler error calling REDUCE(3f)

ur
New Contributor II
440 Views

Does this produce an error with the latest version of ifort(1)?

     program demo_reduce
      use, intrinsic :: iso_fortran_env, only : compiler_version, compiler_options
      implicit none
      real,allocatable :: arr(:)
        print '(4a)', &
           'This file was compiled by ', &
           compiler_version(),           &
           ' using the options ',        &
           compiler_options()
         arr=[1.0, -1.0, 2.0, -2.0, 3.0 -3.0 ]
         write(*,*)reduce(arr, my_mult)
         write(*,*)reduce(arr, my_mult, mask=arr>0.0)
      contains
         pure function my_mult(a,b) result(c)
         real,intent(in) :: a, b
         real            :: c
            c=a*b
         end function my_mult
      end program demo_reduce

! bug.f90(6): catastrophic error: **Internal compiler error: internal abort** 
!             Please report this error along with the circumstances in
!             which it occurred in a Software Problem Report.  Note:
!             File and line given may not be explicit cause of this error.

! This file was compiled by Intel(R) Fortran Intel(R) 64 Compiler
! Classic for applications running on Intel(R) 64, Version 2021.3.0 Build
! 20210609_000000 using the options

 

0 Kudos
1 Solution
Devorah_H_Intel
Moderator
408 Views

I tested it with 2021.6 ifort and there is an ice.

However the upcoming 2021.7 ifort (part of oneAPI HPC toolkit 2022.3 to be released soon) doesn't ICE.  

View solution in original post

0 Kudos
2 Replies
Devorah_H_Intel
Moderator
409 Views

I tested it with 2021.6 ifort and there is an ice.

However the upcoming 2021.7 ifort (part of oneAPI HPC toolkit 2022.3 to be released soon) doesn't ICE.  

0 Kudos
ur
New Contributor II
397 Views

Thanks. That eliminates trying to post a bug report; testing it out more completely can wait till I get upgraded.

0 Kudos
Reply