diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2014-09-30 16:08:53 +0000 |
---|---|---|
committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2014-09-30 16:08:53 +0000 |
commit | cc811a8ae6c760955ac2dca51d8359d003c8e4f2 (patch) | |
tree | ab32b139b652fc4cee08f6e47ca2d986547e773f /libcpp/errors.c | |
parent | cd91371c5f1ed77c2acdde60f194a98df95c241b (diff) | |
download | gcc-cc811a8ae6c760955ac2dca51d8359d003c8e4f2.tar.gz |
re PR preprocessor/58893 (<command-line>:0:0: internal compiler error: Segmentation fault)
2014-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR preprocessor/58893
* errors.c (cpp_diagnostic): Fix possible out of bounds access.
* files.c (_cpp_stack_include): Initialize src_loc for IT_CMDLINE.
testsuite:
2014-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR preprocessor/58893
* gcc.dg/pr58893.c: New test case.
* gcc.dg/pr58893-0.h: New include.
From-SVN: r215730
Diffstat (limited to 'libcpp/errors.c')
-rw-r--r-- | libcpp/errors.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libcpp/errors.c b/libcpp/errors.c index d1ca7a12ff4..bc857f0b81d 100644 --- a/libcpp/errors.c +++ b/libcpp/errors.c @@ -48,10 +48,7 @@ cpp_diagnostic (cpp_reader * pfile, int level, int reason, current run -- that is invalid. */ else if (pfile->cur_token == pfile->cur_run->base) { - if (pfile->cur_run->prev != NULL) - src_loc = pfile->cur_run->prev->limit->src_loc; - else - src_loc = 0; + src_loc = 0; } else { |