I know that my compiler is licensed, but I am not sure if we are paid for support. I just got a compiler failure trying to use parameterized derived types. I am going to attach the build log, which is very short. This is just a proof of concept program.
Compiling with Intel(R) Visual Fortran Compiler 22.214.171.1241 [IA-32]... ifort /nologo /debug:full /Od /fpp /extend_source:80 /warn:none /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc150.pdb" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86" /Qm32 "C:\Michael\params_test_2\Console1\Console1\bonddefinition.f90" C:\Michael\params_test_2\Console1\Console1\$OVERRIDE.fi(29): catastrophic error: **Internal compiler error: internal abort** 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. Internal error store_pdtlen_data_space: Cannot find record compilation aborted for C:\Michael\params_test_2\Console1\Console1\bonddefinition.f90 (code 1) test_params_2 - 1 error(s), 0 warning(s)
I could not attach the html file. So I just added the text.
**Internal compiler error is a bug even if your code is non-conforming.
You should file a ticket or if that is not possible post a source file that reproduces here
and someone will take it up.
Here is some simplified code.
The following code is in an include file. Call it test.fi
module called param.mod
integer ms_ = 21
A module for this case called test.mod contains the following
type , public :: b$$s
type (override$_data (num_elements= ms_) ):: over
public :: set_parameters
There isn't compilable code there without making quite a number of edits which may end up missing the point. Why not just zip the files 2 or 3 small files and attach it.
Your code above is non-standard e.g., #include directive when Fortran language supports INCLUDE statement with its own rules for syntax: see this. It also looks incomplete: what is 'override$_data' in your TYPE declaration in the module named 'test'. Intel Fortran can very well find it impossible to process what you show and throw an "internal compiler error" in response i.e., unless you have specified just the right combinations of options and steps to make it work e.g., preprocessor instructions. Otherwise one can't blame ifort for suffering from an ICE with your code.
It'll be rather difficult, if not impossible, for you to get any useful guidance given your posts here. Your posts do suggest you can help yourself greatly by reviewing closely a few textbooks on Fortran, say Chapman's latest edition on Fortran for Scientists and Engineers.
Here are some facts regarding internal compiler errors that are worth noting.
I found out we have full support. Would like to report this ice. Can someone please give me the instructions as I have never had to do it before.
The bug ID is CMPLRIL0-33130
The code has a number of syntax errors. Granted, it should not cause an internal error. that is a bug in the compiler. Our recommendation is to install the latest PSXE 2020 compiler which will show you the syntax errors that you can repair to continue your development. A fix in PSXE 2019 would take too long to get to you.
Start with this error
type override$_data(num_elements, num_groups)
integer*4, len :: num_elements, num_groups
type (date$_set) ride(mkd_)
integer*4, dimension(num_elements) :: number_tables
integer*4 padding ! ms_ is odd number
integer*4, dimension(num_groups) :: first
integer*4, dimension(num_groups) :: length
integer*4, dimension(num_groups) :: start_date
integer*4, dimension(num_groups) :: basis
integer*4, dimension(num_groups) :: group
integer*4, len :: num_elements, num_groups
LEN is out of position or is not an attribute of INTEGER types. Check this syntax with your book. What book are you using? If you are new to Fortran this seems a very ambitious program to start with.
Is your comment that :
a) sequence should follow integer, len :: ..., or
b) parameterised derived types are not available?
I agree that "this seems a very ambitious program to start with"
asks of OP: ".. Check this syntax with your book. What book are you using? .."
It's unclear whether OP is referring to any "book" though I've oft suggested to OP to do so.
Re: SEQUENCE, current Fortran standard (Fortran 2018) disallows its use in a derived type with a type-parameter (aka parameterized derived type or PDT):
1 126.96.36.199 Sequence type 2 R731 sequence-stmt is SEQUENCE 3 C740 (R726) If SEQUENCE appears, the type shall have at least one component, each data component shall 4 be declared to be of an intrinsic type or of a sequence type, the derived type shall not have any type 5 parameter, and a type-bound-procedure-part shall not appear.
OP, if serious about refactoring old code and gain advantages with modern computing, would do well to unlearn all of nonstandard FORTRAN involving heavy compiler-specific extensions and spend the time and effort to get good familiarity with current standard Fortran before writing new code. Hacking away without such hard yards is a guaranteed exercise in futility.
Letting "sleeping dogs lie" with all the nonstandard stuff in code of running applications and "don't fix if ain't broken" are the "conventional" wisdom that program managers in for-profit orgs can force on staff when they appear unwilling or entirely unable to approach code modernization with any form of discipline or structure.
Ignoring for the moment your use of nonstandard syntax such as integer*4, the immediate problem with that type definition is that the standard requires SEQUENCE, if present, to follow type parameter declarations. So move the SEQUENCE after the declaration of the LEN parameters.
If I do that, I get an ICE - that's definitely a compiler bug.
If I remove the SEQUENCE entirely, then I get the (appropriate) error that it has to be SEQUENCE because it includes a SEQUENCE type component.
But if I then remove all SEQUENCE lines from the code, then I still get the ICE. So the bug is not related to SEQUENCE.
I have been following an example in the book Guide to Fortran 2008 programming
type, public :: matrix(rows, cols, k)
integer len :: rows, cols
integer, kind :: k =kind(0.0)
real(kind = k), dimension (rows, cols) :: values
end type matrix
type (matrix =:, cols=:, k=kind(0.0)) = double) :: A
According to the technical support people len can only be used to specify the length of character strings. But, as you see in the above example that is not what they are doing.
A length type parameter can be used for array bounds or character lengths. The main difference between a length type parameter and a kind type parameter is that the latter is a constant and the former is evaluated at run-time when the procedure is entered. Support people aren't always current on the language, unfortunately, and PDTs, while they have been supported in Intel Fortran for a long time now, are not familiar to many.
As I wrote above, the syntax error was from your introduction of SEQUENCE in the wrong position. It is unrelated to the ICE.