- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I get a compiler error when 'use'ing one of the libraries of FoX (fortran xml library). The compilation may or may not succeed depending on the position of the USE statement inside the module.
If it is located in the subroutine inside the module, the compilation does not succeed. If it is located in the first part of the module, the compilation is successful.
To reproduce the problem, download the latest release of the Fortran xml library.
Download it, extract it and compile the library (this should work without problems):
$ wget http://source.uszla.me.uk/FoX/FoX-3.1.2-full.tar.gz
$ tar -xzf FoX-3.1.2-full.tar.gz
$ cd FoX-3.1.2/
$ ./configure FC=ifort
$ make
Add the following file (test.f90) in the top-level directory of the FoX directory:
$ cat test.f90
module test
!use FoX_dom
implicit none
contains
subroutine bugtest ()
! comment next line and uncomment line 2 to make this module compile
use FoX_dom
implicit none
character(len=*) , parameter :: xml_file = "test.xml"
type(Node) , pointer :: doc_ptr
type(NodeList) , pointer :: test_list_ptr
integer :: i , test
doc_ptr => parseFile( xml_file )
test_list_ptr => getElementsByTagName( doc_ptr , "test" )
print *, getLength( test_list_ptr )
end subroutine bugtest
end module test
!======================================
Compile it as follows:
$ ifort -o tst.o -c -I./objs/finclude test.f90
And you get:
fortcom: Severe: **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 test.f90 (code 3)
Now, uncomment line 2 and comment line 7 and recompile.
Compilation finishes successfully.
Can anyone confirm this?
Greetings,
Wim
I get a compiler error when 'use'ing one of the libraries of FoX (fortran xml library). The compilation may or may not succeed depending on the position of the USE statement inside the module.
If it is located in the subroutine inside the module, the compilation does not succeed. If it is located in the first part of the module, the compilation is successful.
To reproduce the problem, download the latest release of the Fortran xml library.
Download it, extract it and compile the library (this should work without problems):
$ wget http://source.uszla.me.uk/FoX/FoX-3.1.2-full.tar.gz
$ tar -xzf FoX-3.1.2-full.tar.gz
$ cd FoX-3.1.2/
$ ./configure FC=ifort
$ make
Add the following file (test.f90) in the top-level directory of the FoX directory:
$ cat test.f90
module test
!use FoX_dom
implicit none
contains
subroutine bugtest ()
! comment next line and uncomment line 2 to make this module compile
use FoX_dom
implicit none
character(len=*) , parameter :: xml_file = "test.xml"
type(Node) , pointer :: doc_ptr
type(NodeList) , pointer :: test_list_ptr
integer :: i , test
doc_ptr => parseFile( xml_file )
test_list_ptr => getElementsByTagName( doc_ptr , "test" )
print *, getLength( test_list_ptr )
end subroutine bugtest
end module test
!======================================
Compile it as follows:
$ ifort -o tst.o -c -I./objs/finclude test.f90
And you get:
fortcom: Severe: **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 test.f90 (code 3)
Now, uncomment line 2 and comment line 7 and recompile.
Compilation finishes successfully.
Can anyone confirm this?
Greetings,
Wim
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh yes,
It also compiles if the last line in the subroutine is removed.
Then, it doesn't matter where the USE statement is located.
So, the function call "getLength()" seems to cause some problems...
Wim
It also compiles if the last line in the subroutine is removed.
Then, it doesn't matter where the USE statement is located.
So, the function call "getLength()" seems to cause some problems...
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel Customer Support doesn't seem to understand the problem, so can anyone try (and confirm) the following (which also triggers the compiler error for me):
$ wget http://users.pandora.be/tuinbels/bugs/ifort-error.tgz
$ tar -xzf ifort-error.tgz
$ ifort -o tst.o -c -I. test.f90
fortcom: Severe: **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 test.f90 (code 3)
The archive contains (some of the) mod files from the FoX library, compiled on linux x86_64, together with a test file that triggers the compiler bug.
Greetings,
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll take a look.
What's the support case number?
What's the support case number?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can reproduce it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the issue number is 471178
Thanks for looking into it.
Thanks for looking into it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A workaround, other than the one you found, is to disable the PRIVATE statement in FoX_dom.f90.

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