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 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
   interface operator(.divisiblebytwo.)
      module procedure d2
   end interface
   public :: operator(.divisiblebytwo.)


   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)


3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

Retired 12/31/2016

This has been fixed for a future release.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today