This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42888] [4.5 Regression] ICE in fold_convert_loc, at fold-const.c:2670
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2010 13:27:16 -0000
- Subject: [Bug fortran/42888] [4.5 Regression] ICE in fold_convert_loc, at fold-const.c:2670
- References: <bug-42888-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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