------- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-11-21 12:25
-------
The following (doesn't need to be compiled with -fdefault-integer-8):
character (len=5) :: c
integer(kind=8) :: i
i = 3
c(i:i) = 'a'
if (c(i:i) /= 'a') call abort ()
end
gives the tree code below:
integer(kind=4) D.864;
integer(kind=4) D.863;
D.863 = (integer(kind=4)) i;
D.864 = (integer(kind=4)) i;
if (_gfortran_compare_string (MAX_EXPR <(1 - D.863) + D.864, 0>,
(character(kind=1)[1:5] *) &c[D.863]{lb: 1 sz: 1}, 1, &"a"[1]{lb: 1 sz: 1}) !=
0)
_gfortran_abort ();
We simply don't see that D.863 and D.864 are equal, due to the conversion.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-11-21 12:25:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34145