Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

ICE renaming an operator

$
0
0

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


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>