Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Internal Compiler Error

dundar11
Beginner
643 Views
When I compile this with
Intel Fortran Compiler XE for applications running on IA-32, Version 12.1.1.256 Build 20111011
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
ntel Fortran Compiler XE for applications running on IA-32, Version 12.1.1.256 Build 20111011Copyright (C) 1985-2011 Intel Corporation. All rights reserved.FOR NON-COMMERCIAL USE ONLY
I receive this error:
catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
compilation aborted for istanbul_module_003.f90 (code 1)
suspecting problem with generic type binding statement...
dundar.
----------------------------------
module ankara
type afyon
real(8) , dimension (:) , private, allocatable :: sandikli_
contains
procedure , private :: get_sandikli
procedure , private :: set_sandikli
generic :: sandikli => get_sandikli , set_sandikli
end type
contains
function get_sandikli(this,i,j) result (dat)
class(afyon) :: this
integer :: i , j
real(8) :: dat
dat =0.0
! function definitions operates on private array sandikli_
end function get_sandikli

function set_sandikli(i,dat)
!similar to get function
....
! function definitions operates on array sandikli_
end function set_sandikli
end module ankara
another file....
module istanbul
use module ankara
type kusura
real(8) :: dumy
type(afyon) :: sokak
end type
contains
function update_sandikli(this)
class(kusura) :: this
real(8) :: value
value=sokak%sandikli(i,j)
end function
end module istanbul
0 Kudos
3 Replies
oleglebedev
New Contributor I
643 Views
I could not reproduce your error. Look at my test below:
[fortran]MODULE point_class
    IMPLICIT NONE
!
TYPE, public :: point
  PRIVATE
  integer, dimension(:), allocatable :: xx
    CONTAINS
      procedure, private :: initialization_sub
      procedure, private :: get_fn
      generic :: every => initialization_sub, get_fn
END TYPE point
!
private :: initialization_sub
private :: get_fn
!
CONTAINS
!
subroutine initialization_sub(this, x)
    implicit none
    class(point) :: this
    integer, dimension(:), intent(IN) :: x
    integer :: istat
if ( .NOT. allocated(this%xx) ) then
  allocate( this%xx(1:size(x)), STAT=istat )
    if ( istat /= 0 ) stop 'can not ALLOCATE this%xx'
this%xx(1:size(x)) = x(:)
end if
return
end subroutine initialization_sub
!
!
!DEC$ ATTRIBUTES FORCEINLINE :: get_fn
ELEMENTAL integer function get_fn(this, i) RESULT(res)
    implicit none
    class(point), intent(IN) :: this
    integer, intent(IN) :: i
res = this%xx(i)
return
end function get_fn
!
END MODULE point_class
!
!
!
!
PROGRAM main
    USE point_class
    IMPLICIT NONE
    type :: another
      integer :: yy
      type(point), dimension(:), allocatable :: pp
    end type another
    type(point) :: p
    type(another) :: a
    integer :: i, j, istat, int_array(3)
!
call p%every( (/1, 2, 4, 5, 7, 8/) )
write( *, * ) ( p%every(i), i=1,6 )
!
allocate( a%pp(1:3), STAT=istat )
  if ( istat /= 0 ) stop 'can not ALLOCATE a%pp'
do i = 1, 3
  int_array = (/ 1, 2, 3 /)
  call a%pp(i)%every( int_array(:)*i )
  write( *, * ) ( a%pp(i)%every(j), j=1,3 )
end do
!
END PROGRAM main
[/fortran]
You should be a bitattentive with a nested derived type.
I use
ifort -V
Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.0.3.174 Build 20110309
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
Oleg.
0 Kudos
Steven_L_Intel1
Employee
643 Views
Would you please attach the actual source file you are using, rather than a fragment and paraphrase? What you show here has too many syntax and other errors. Also please show us the switches you are using on the ifort line.
0 Kudos
dundar11
Beginner
643 Views
I have started a private thread and attached all my source codes.
Thanks Steve.
Dundar.
0 Kudos
Reply