Commit ca708025 by Richard Biener Committed by Richard Biener

re PR pch/65550 (ICE (segfault) with pch)

2015-04-09  Richard Biener  <rguenther@suse.de>

	PR pch/65550
	* files.c (pch_open_file): Allow main and pre-included files
	when trying to open a PCH.

From-SVN: r221949
parent 3184f36f
2015-04-09 Richard Biener <rguenther@suse.de>
PR pch/65550
* files.c (pch_open_file): Allow main and pre-included files
when trying to open a PCH.
2015-04-06 Jakub Jelinek <jakub@redhat.com> 2015-04-06 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/61977 PR preprocessor/61977
......
...@@ -291,11 +291,13 @@ pch_open_file (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch) ...@@ -291,11 +291,13 @@ pch_open_file (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch)
/* If the file is not included as first include from either the toplevel /* If the file is not included as first include from either the toplevel
file or the command-line it is not a valid use of PCH. */ file or the command-line it is not a valid use of PCH. */
if (pfile->all_files for (_cpp_file *f = pfile->all_files; f; f = f->next_file)
&& pfile->all_files->next_file if (f->implicit_preinclude)
&& !(pfile->all_files->implicit_preinclude continue;
|| pfile->all_files->next_file->implicit_preinclude)) else if (f->main_file)
return false; break;
else
return false;
flen = strlen (path); flen = strlen (path);
len = flen + sizeof (extension); len = flen + sizeof (extension);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment