ICE renaming an operator

ICE renaming an operator

The rename is backward, but generates an ICE.

$ ifort ifort_bug.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Inte
l(R) 64, Version 14.0.1.139 Build 20131008
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.

fortcom: Fatal: There has been an internal compiler error (C0000005).
compilation aborted for ifort_bug.f90 (code 1)

====================

module op_mod
   implicit none
   private
   interface operator(.divisiblebytwo.)
      module procedure d2
   end interface
   public :: operator(.divisiblebytwo.)

contains

   function d2(n)
      integer, intent(in) :: n
      logical :: d2
      d2 = modulo (n, 2) == 0
   end function d2

end module op_mod

! This is backwards, but causes internal compiler error.
use op_mod, operator(.divisiblebytwo.) => operator(.even.)
implicit none

print *, .even. (-5), .even. (-4)

end

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Steve Lionel (Intel)'s picture

Thanks, Walt! I'll let the developers know.

Steve
Steve Lionel (Intel)'s picture

This has been fixed for a future release.

Steve

Login to leave a comment.