[Bug fortran/57562] [OOP] ICE due to extended derived type with PARAMETER attribute

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 31 18:11:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57562

--- Comment #6 from janus at gcc dot gnu.org ---
While trying to transform the example in comment 0 into a testsuite-suitable
form, I came across the following problem (with the patch in comment 5):

   type :: Parent
      integer :: member1 = 0
   end type

   type, extends(Parent) :: Child
      integer :: member2 = 0
   end type

   type(Child), parameter :: object = Child(23, 42)

   if (object%member1 /= 23) call abort
   if (object%member2 /= 42) call abort

end


    if (object%member1 /= 23) call abort
       1
Error: Operanden des Vergleichsoperators »/=« bei (1) sind
TYPE(parent)/INTEGER(4)

Just as the original example, it ICEs with 4.9.


More information about the Gcc-bugs mailing list