diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2008-05-14 14:23:01 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2008-05-14 14:23:01 +0000 |
commit | b0b14c7b87bc8456c809b7b6017c2918403350bf (patch) | |
tree | edf0d4c0680182ee2fa42bbadc0eda3ab859d4ea /gcc | |
parent | 349c31669777d87db0e7ec437d8b5bd5499d74d6 (diff) | |
download | gcc-b0b14c7b87bc8456c809b7b6017c2918403350bf.zip gcc-b0b14c7b87bc8456c809b7b6017c2918403350bf.tar.gz gcc-b0b14c7b87bc8456c809b7b6017c2918403350bf.tar.bz2 |
re PR fortran/36215 (Fortran bootstrap fails on _abs_c4.F90)
PR fortran/36215
* scanner.c (preprocessor_line): Allocate enough memory for a
wide string.
* gfortran.dg/include_3.f95: New test.
From-SVN: r135294
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/scanner.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/include_3.f95 | 26 |
4 files changed, 38 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 0556310..7ed34a6 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> + + PR fortran/36215 + * scanner.c (preprocessor_line): Allocate enough memory for a + wide string. + 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR fortran/36176 diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 21b9311..13e0615 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -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) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bd147b4..0ff79cc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> + + PR fortran/36215 + * gfortran.dg/include_3.f95: New test. + 2008-05-14 Ira Rosen <irar@il.ibm.com> PR tree-optimization/36098 diff --git a/gcc/testsuite/gfortran.dg/include_3.f95 b/gcc/testsuite/gfortran.dg/include_3.f95 new file mode 100644 index 0000000..fba07cb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/include_3.f95 @@ -0,0 +1,26 @@ +# 1 "../../../trunk/libgfortran/generated/_abs_c4.F90" +# 1 "C:\\msys\\1.0.10\\home\\FX\\ibin\\i586-pc-mingw32\\libgfortran//" +# 1 "<built-in>" +# 1 "<command-line>" +# 1 "../../../trunk/libgfortran/generated/_abs_c4.F90" +! Comment here + +# 1 "./config.h" 1 + +# 37 "../../../trunk/libgfortran/generated/_abs_c4.F90" 2 + +# 1 "./kinds.inc" 1 +# 38 "../../../trunk/libgfortran/generated/_abs_c4.F90" 2 + +# 1 "./c99_protos.inc" 1 +# 39 "../../../trunk/libgfortran/generated/_abs_c4.F90" 2 + +elemental function abs_c4 (parm) + complex (kind=4), intent (in) :: parm + real (kind=4) :: abs_c4 + + abs_c4 = abs (parm) +end function + +! { dg-do compile } +! { dg-options "-fpreprocessed -g3" } |