- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I ran into an internal compiler error when implementing a simple linked list containing derived types. I managed to isolate the problem to a trivial test case that reproduces the error. The test program does not do anything useful, it only manages to crash the compiler when compiled.
The problem seems to be compling the call to TAIL type bound procedure with the OO syntax at line 33. If this line is commented out the program compiles nicely.
I found a workaround to the problem. If the LIST_TAIL function is modified to return an allocatable type, the code compiles and works ok.
I ran into an internal compiler error when implementing a simple linked list containing derived types. I managed to isolate the problem to a trivial test case that reproduces the error. The test program does not do anything useful, it only manages to crash the compiler when compiled.
[bash]MODULE TEST_MOD IMPLICIT NONE TYPE TEST_TYPE CHARACTER(LEN=:), ALLOCATABLE :: STR END TYPE END MODULE MODULE LIST_MOD USE TEST_MOD IMPLICIT NONE TYPE :: LIST TYPE(TEST_TYPE), POINTER :: OBJ => NULL() TYPE(LIST), POINTER :: NEXT => NULL() CONTAINS PROCEDURE :: TAIL => LIST_TAIL END TYPE CONTAINS FUNCTION LIST_TAIL( THIS ) CLASS(LIST) :: THIS TYPE(LIST) :: LIST_TAIL IF (ASSOCIATED( THIS % NEXT ) ) THEN LIST_TAIL % NEXT => THIS % NEXT % NEXT LIST_TAIL % OBJ => THIS % NEXT % OBJ END IF END FUNCTION END MODULE PROGRAM TEST USE LIST_MOD IMPLICIT NONE TYPE(LIST) :: L, TAIL TAIL = LIST_TAIL(L) TAIL = L % TAIL() END PROGRAM[/bash]Compiling this gives the following error message:
ifort test.f90
->
Intel Visual Fortran Compiler Professional for applications running on IA-32, Version 11.1 Build 20091130 Package ID: w_cprof_p_11.1.054 Copyright (C) 1985-2009 Intel Corporation. All rights reserved. fortcom: Fatal: There has been an internal compiler error (C00000FD). compilation aborted for test.f90 (code 1)
The problem seems to be compling the call to TAIL type bound procedure with the OO syntax at line 33. If this line is commented out the program compiles nicely.
I found a workaround to the problem. If the LIST_TAIL function is modified to return an allocatable type, the code compiles and works ok.
[bash] FUNCTION LIST_TAIL( THIS ) CLASS(LIST) :: THIS TYPE(LIST), ALLOCATABLE :: LIST_TAIL ALLOCATE( LIST_TAIL ) IF (ASSOCIATED( THIS % NEXT ) ) THEN LIST_TAIL % NEXT => THIS % NEXT % NEXT LIST_TAIL % OBJ => THIS % NEXT % OBJ END IF END FUNCTION [/bash]
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - I can reproduce this. I'll report it to the developers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It turns out that this is already fixed for our next major release, due out soon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great!
When is the expected release date?
-Heikki
When is the expected release date?
-Heikki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sometime in November.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page