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

Internal compiler error in inheritance problem

pwl_b
Novice
921 Views
I have noticed that the following code causes compiler error in ifort12.1.0 20110811, while it works with gfortran4.6.1 20110422. The code seems, to me, to be a proper Fortran 2003. The strange thing is that if you uncomment the four lines in program test it starts to work. Also either, removing the statement private from class_b, or removing the contents of type :: a (the logical variable), has the same positive effect.
[fortran]module class_a

  type :: a
     logical :: initialized = .false.
  end type a

end module class_a

module class_b

  use class_a

  private

  type, public, extends(a) :: b
  end type b

end module class_b

module class_c

  use class_b

  type, extends(b) :: c
     logical :: test_result = .false.
  end type c

end module class_c

program test

  ! use class_initializable
  ! use class_trigger
  use class_c

  ! type(initializable) :: i
  ! type(trigger) :: t
  type(c) :: t

  t = c()

end program test
[/fortran]
0 Kudos
4 Replies
Steven_L_Intel1
Employee
921 Views
Thanks - I can reproduce this in Update 6. It does seem to build in Update 5 so you may want to revert to that until it gets fixed. I will report this to the developers. Issue ID is DPD200174088.
0 Kudos
pwl_b
Novice
921 Views
Thank you for your answer, I will keep track of this issue. Is it possible to download Update 5 with a noncommercial licence? If yes, where can I get it?
0 Kudos
Steven_L_Intel1
Employee
921 Views
Sure. Just log in to the Intel Registration Center - register your serial number if not already registered. You can then use the version dropdown on the compiler download page to select an earlier version.
0 Kudos
Steven_L_Intel1
Employee
921 Views
This problem has been fixed for a release later this year. Use internal issue ID DPD200176665 for tracking.
0 Kudos
Reply