diff options
author | Per Bothner <pbothner@apple.com> | 2003-07-22 23:11:34 +0000 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2003-07-22 16:11:34 -0700 |
commit | b3147029a5847526b07b9d4823e3beec3c315402 (patch) | |
tree | c5ff92c7cf13057ab75e4e04cb9a729a41f66d88 /gcc/line-map.c | |
parent | 53f72d60b6d2b4187b854f36f2768366418b3151 (diff) | |
download | gcc-b3147029a5847526b07b9d4823e3beec3c315402.zip gcc-b3147029a5847526b07b9d4823e3beec3c315402.tar.gz gcc-b3147029a5847526b07b9d4823e3beec3c315402.tar.bz2 |
re PR preprocessor/11361 (ICE (segfault) in c-lex.c with one-liner)
* line-map.c (add_line_map): Handle invalid LEAVE request.
Fixes PR preprocessor/11361.
From-SVN: r69688
Diffstat (limited to 'gcc/line-map.c')
-rw-r--r-- | gcc/line-map.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/line-map.c b/gcc/line-map.c index f3c2369..50c9c88 100644 --- a/gcc/line-map.c +++ b/gcc/line-map.c @@ -96,9 +96,15 @@ linemap_add (struct line_maps *set, enum lc_reason reason, if (MAIN_FILE_P (map - 1)) { - set->depth--; - set->used--; - return NULL; + if (to_file == NULL) + { + set->depth--; + set->used--; + return NULL; + } + error = true; + reason = LC_RENAME; + from = map - 1; } else { |