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

Internal Compiler Error for erraneous "module procedure"

Satish_BD
Beginner
1,105 Views

Hi, The following program causes ifort to choke up with an ICE.The cause of the error is highlighted below.ifort shows a valid error message after which it ICEs. ========== BEGIN test.f90 ==============[fortran]module m_my type t_my character(len=:), allocatable :: x end type t_my interface t_my procedure :: t_my_init !! This line must be "module procedure" end interface t_my contains function t_my_init(x) result(my) character(len=*), intent(in) :: x type(t_my) :: my my%x = "Hello" end function t_my_init end module m_my [/fortran] ============= END test.f90 ============Compiled with: ifort -c test.f90/tmp/ifort3puslA.i90: 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. ifort --versionifort (IFORT) 12.0.3 20110309Copyright (C) 1985-2011 Intel Corporation.All rights reserved.-- Satish BD

0 Kudos
3 Replies
Steven_L_Intel1
Employee
1,105 Views
Actually, the Fortran 2003 standard allows you to omit the keyword MODULE here. Unfortunately, our compiler doesn't yet support this and gets very confused when you leave out the MODULE. I already have issue DPD200138183 filed on this - I will add your example to that issue. We apologize for the inconvenience.
0 Kudos
Satish_BD
Beginner
1,105 Views
Thanks Dr. Fortran !
0 Kudos
Steven_L_Intel1
Employee
1,105 Views

This got fixed in a 13.0 update. Sorry for not updating the thread earlier.

0 Kudos
Reply