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
This commit is contained in:
Per Bothner 2003-07-22 23:11:34 +00:00 committed by Per Bothner
parent 53f72d60b6
commit b3147029a5
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2003-07-22 Per Bothner <pbothner@apple.com>
* line-map.c (add_line_map): Handle invalid LEAVE request.
Fixes PR preprocessor/11361.
2003-07-22 Per Bothner <pbothner@apple.com>
* diagnostic.c.(diagnostic_report_current_module): Update to match

View File

@ -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
{