From: Richard Guenther Date: Fri, 9 Sep 2005 13:37:03 +0000 (+0000) Subject: re PR c/20239 (ICE on empty preprocessed input) X-Git-Tag: releases/gcc-3.4.5~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f583a973169244a7a24b1477d1aed6cd7f3219be;p=thirdparty%2Fgcc.git re PR c/20239 (ICE on empty preprocessed input) 2005-09-09 Richard Guenther PR c/20239 * cppinit.c (cpp_read_main_file): Avoid segfaulting on NULL pfile->map. From-SVN: r104096 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b6912beb54c..3bb65ce47ef1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-09-09 Richard Guenther + + PR c/20239 + * cppinit.c (cpp_read_main_file): Avoid segfaulting on + NULL pfile->map. + 2005-09-09 Richard Guenther PR c++/23624 diff --git a/gcc/cppinit.c b/gcc/cppinit.c index ae30568699c5..b83b6f2528d5 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -477,6 +477,8 @@ cpp_read_main_file (cpp_reader *pfile, const char *fname) if (CPP_OPTION (pfile, preprocessed)) { read_original_filename (pfile); + if (!pfile->map) + return NULL; fname = pfile->map->to_file; } return fname;