mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
3184f36f4f
commit
ca70802553
|
|
@ -1,3 +1,9 @@
|
|||
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>
|
||||
|
||||
PR preprocessor/61977
|
||||
|
|
|
|||
|
|
@ -291,10 +291,12 @@ 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
|
||||
file or the command-line it is not a valid use of PCH. */
|
||||
if (pfile->all_files
|
||||
&& pfile->all_files->next_file
|
||||
&& !(pfile->all_files->implicit_preinclude
|
||||
|| pfile->all_files->next_file->implicit_preinclude))
|
||||
for (_cpp_file *f = pfile->all_files; f; f = f->next_file)
|
||||
if (f->implicit_preinclude)
|
||||
continue;
|
||||
else if (f->main_file)
|
||||
break;
|
||||
else
|
||||
return false;
|
||||
|
||||
flen = strlen (path);
|
||||
|
|
|
|||
Loading…
Reference in New Issue