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

Bug in ifort?

nagl46
Beginner
424 Views
Hello,

i try to compile this code with ifort12.0.0 20101006. I get no error messages during compiling but the program fails with segmentation fault.

MODULE types
IMPLICIT NONE
TYPE :: parent_t
INTEGER, PRIVATE :: a
CONTAINS
PROCEDURE :: get_a => get_a_fun
PROCEDURE :: set_a => set_a_sub
END TYPE
PRIVATE :: set_a_sub
PRIVATE :: get_a_fun
CONTAINS
SUBROUTINE set_a_sub(this, intvalue)
CLASS(parent_t) :: this
INTEGER :: intvalue
this%a = intvalue
END SUBROUTINE
INTEGER FUNCTION get_a_fun(this)
CLASS(parent_t) :: this
get_a_fun = this%a
END FUNCTION
END MODULE types
PROGRAM types_tester
USE types

IMPLICIT NONE

TYPE(parent_t) :: human
  • INTEGER :: aa
    CALL human%set_a(99)
    aa = human%get_a()

    write(*,*) aa
    END PROGRAM
    Thanks for helping
    Alex
    0 Kudos
    1 Reply
    TimP
    Honored Contributor III
    424 Views
    I get a segfault/internal error at compile time with a current compiler
    Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.1.1.256 Build 20111011
    so this case definitely qualifies for submission in a problem report.
    0 Kudos
    Reply