So it is *possible* that I do not correctly understand the semantics of allocatable function results, allocatable scalars, allocatable derived type components, and overloaded assignment and binary operators, but more on this in another post. While compiling the attached code as:
[bash]$ ifort -warn -c -stand f08 -fpp -assume realloc_lhs stringhelper.F90[/bash]
I got the following error:
[plain]
stringhelper.F90(125): 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.
compilation aborted for stringhelper.F90 (code 1)
[/plain]
Now if I comment out the procedure surrounding line 125 and the associated derived type bindings and operator overloading the problem goes away. I have yet to test this code for correct behavior/bugs.
You guys have any QA openings? I'm graduating soonish ;-)
-Z
链接已复制
One further note: If I replace the call to the function ConcatChars on line 125 with an overloaded concatenation operator (which will resolve to that function) it still fails. However, since, I have access to the type components from the module procedures/TBPs if I replace the function call with the intrinsic concatenation operator there is no longer any catastrophic error. The -assume reallocate_lhs or -standard-semantics flags will ensure that the res%string component has the correct character length.
