------- Comment #8 from burnus at gcc dot gnu dot org 2010-01-28 13:27 ------- (In reply to comment #7) > Btw: Isn't this whole thing of 'integer component with real initializer' > invalid in some way? Shouldn't we at least throw a warning?
Well, according to the standard (F2008 because I have it at hand): "numeric type -- one of the types integer, real, and complex" "For an intrinsic assignment statement where the variable is of numeric type, the expr may have a different numeric-type or kind type parameter, in which case the value of expr is converted to the type and kind type parameter of the variable [...]" Thus it is definitely valid. The question, when to warn and when not, is a difficult one. -Wconversion does (should) warn in this case; some argue that it is too verbose; I agree, but the last time I was thinking about -Wconversion, I had problems to come up with rules which warn exactly as wanted. (Regarding the rest: No idea - without access to the source it is too inconvenient to debug.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42888