http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47633

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-07 
18:58:24 UTC ---
>     if (ichar(v(n:n)) /= 41 .or. ichar(v(n+1:n+1)) /= 32) call abort()

(In reply to comment #4)
> The testcase is bad, because for vanilla gcc releases there is no (prerelease)
> etc. string at all (DEV-PHASE is empty), and because it hardcodes ASCII 
> values,
> so I'm afraid it could fail on EBCDIC or other targets.

Regarding the char: using "iachar" instead of "ichar" should work.

 * * *

   len = strlen ("GCC version ") + strlen (version_string) + 1;
+  buffer = XALLOCAVEC (char, len);
   snprintf (buffer, len, "GCC version %s", version_string);
   return gfc_get_character_expr (gfc_default_character_kind,
+                                &gfc_current_locus, buffer, len - 1);

I wonder whether one should strip the "+1" in the first line and use "len+1"
for alloca/snprintf; it seems to be easier to follow than the "len - 1" in the
last line.

Reply via email to