A chain of files like pch -> .h -> .h -> .cpp (pch is included through 2 headers) crashes gcc. This bug is a regression from 4.2.x.
Here's a base64 encoded .tar.gz with example source (sorry, but where's any option to send an attachments here on buzilla? :/): H4sIAOutX0gAA+3XQW+CMBgGYM79FY1etotSWsrBZb9id4O2jiZSSYUty7L/vtYo6MFwWOqy+T4X kgIp5ONtP1bd6zyJLPWKPA9HVuTp+fEkYSzNiiKTBfPjjOWZSGge+8GCbt+WjtJElW87Z+zV68bO /1ErX/8XvW9n66aJNUcosBTiav196U/1z7jgvv6ccZnQNNYDnbvz+k+NXW87penk8BVUE0L6oad9 q8xuVj0TYmxL69LYh0fySSh1uu2cpemCfJHffgP4iZD/xun1rm7MVqtZFWGOsfz79b5f/6VkPv/C n0f+b2E+p6qr6w/E+D71+3+M4B+N5l8M+7+Qmc9/Jn0biPzfwLD/v7uyabQ7tADDdr/AwvCvhfz3 lY80x2j/z9mQ/zzs/5wL9P83MTUbq/SGLo8fwbJakqkfMFZfjA1/BZOLdjH8L2irzIb6TuL8ht9+ MQAAAAAAAAAAAACAO/YNr2yLgQAoAAA= commands that trigger the bug: $ g++ precompiled.h $ g++ Test.cpp In file included from wrapper.h:1, from precompiled.h:1: cc1plus: 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. gcc version: $ gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configure --prefix=/usr --enable-shared --enable-languages=c,c++,fortran,objc,obj-c++,treelang --enable-threads=posix --mandir=/usr/share/man --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic Thread model: posix gcc version 4.3.1 (GCC) -- Summary: segfault when a pch is included through a header file Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: pch AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: davorin dot ucakar at gmail dot com GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36606