------- Comment #3 from dfranke at gcc dot gnu dot org 2008-03-21 10:20 ------- Last night, I tracked this to resolve.c (resolve_structure_cons), but I was not 100% sure what to do.
With the simplified testcase, Intel complains: $> ifort pr34813.f90 fortcom: Error: pr34813.f90, line 15: The type of the NULL(MOLD) element in a structure-constructor differs from the type of the component in the derived-type-def. tree = kd_tree(kd_tree_node(null())) -----------------------------^ fortcom: Error: pr34813.f90, line 15: This array or function or substring is invalid in constant expressions. tree = kd_tree(kd_tree_node(null())) ----------------^ fortcom: Error: pr34813.f90, line 15: Replacing invalid structure constructor by integer 1 [<NULL_STRING>] tree = kd_tree(kd_tree_node(null())) ^ Interestingly, if it is slightly changed, - tree = kd_tree(kd_tree_node(null())) + integer, pointer :: i + tree = kd_tree(kd_tree_node(null(i))) Intel gives an ICE while gfortran happily (but wrongly?) accepts it: $> ifort -warn all pr34813.f90 fortcom: Severe: pr34813.f90, line 12: **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. tree = kd_tree(kd_tree_node(null(i))) ------------------------------^ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34813