------- Comment #2 from fxcoudert at gcc dot gnu dot org 2008-05-14 14:14 ------- I forgot to allocate enough memory for wide strings instead of regular string while unescaping filenames in preprocessor directives, which is fixed by the following patch:
Index: scanner.c =================================================================== --- scanner.c (revision 135088) +++ scanner.c (working copy) @@ -1570,7 +1570,7 @@ preprocessor_line (gfc_char_t *c) if (unescape) { gfc_char_t *s = wide_filename; - gfc_char_t *d = gfc_getmem (c - wide_filename - unescape); + gfc_char_t *d = gfc_get_wide_string (c - wide_filename - unescape); wide_filename = d; while (*s) This removes all valgrind errors under linux and allows compilation of preprocessed files on mingw (bootstrapped is not yet finished, but it compiled _abs_c4.F90 OK and is proceeding further). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36215