https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64908
Bug ID: 64908 Summary: [5 Regression] pch broken Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: pch Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org With a checking=release PGO/LTO bootstrapped compiler I get: arkus@x4 /tmp % touch foo.h markus@x4 /tmp % g++ -c foo.h foo.h:1:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Valgrind shows: ==7155== Syscall param write(buf) points to uninitialised byte(s) ==7155== at 0x4F8A370: __write_nocancel (in /lib64/libc-2.20.90.so) ==7155== by 0x4F2B3EE: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.20.90.so) ==7155== by 0x4F2A9F2: new_do_write (in /lib64/libc-2.20.90.so) ==7155== by 0x4F2C2F0: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.20.90.so) ==7155== by 0x4F2BA66: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.20.90.so) ==7155== by 0x4F2167A: fwrite (in /lib64/libc-2.20.90.so) ==7155== by 0x88647C: ggc_pch_write_object(ggc_pch_data*, _IO_FILE*, void*, void*, unsigned long, bool) (ggc-page.c:2451) ==7155== by 0xA2C1E0: gt_pch_save(_IO_FILE*) (ggc-common.c:566) ==7155== by 0x861FEC: c_common_write_pch() (c-pch.c:197) ==7155== by 0x6E4E8C: cp_write_global_declarations() (decl2.c:4400) ==7155== by 0xC96DD3: compile_file() (toplev.c:608) ==7155== by 0x5F84EE: do_compile (toplev.c:2063) ==7155== by 0x5F84EE: toplev::main(int, char**) (toplev.c:2161) ==7155== Address 0x40492ad is not stack'd, malloc'd or (recently) free'd ==7155== Uninitialised value was created by a heap allocation ==7155== at 0x4028C70: malloc (vg_replace_malloc.c:296) ==7155== by 0x135C257: xmalloc (xmalloc.c:147) ==7155== by 0x132DC8A: _cpp_init_tokenrun (lex.c:2008) ==7155== by 0x132C28A: cpp_create_reader(c_lang, ht*, line_maps*) (init.c:238) ==7155== by 0x85F85C: c_common_init_options(unsigned int, cl_decoded_option*) (c-opts.c:234) ==7155== by 0x5F7F9D: toplev::main(int, char**) (toplev.c:2136) ==7155== by 0x5F9199: main (main.c:39