When compiling wxGTK-2.6.3 with "gcc (GCC) 4.1.2 20060628 prerelease (NetBSD
nb1 20060602)", it fails with:
./bk-make-pch .pch/wxprec_basedll/wx/wxprec.h.gch wx/wxprec.h c++
-I.pch/wxprec_
basedll -D__WXGTK__             -I./src/regex   -DwxUSE_GUI=0
-DWXMAKINGDLL_BASE
 -DwxUSE_BASE=1 -fPIC -DPIC -DWX_PRECOMP -DNO_GCC_PRAGMA -DGTK_NO_CHECK_CASTS
-I
lib/wx/include/gtk2-ansi-release-2.6 -I./include -pthread
-I/usr/pkg/include/gtk
-2.0 -I/usr/pkg/lib/gtk-2.0/include -I/usr/pkg/include/atk-1.0
-I/usr/pkg/includ
e/cairo -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include/glib/glib-2.0
-I/usr/pkg
/lib/glib-2.0/include -I/usr/pkg/include -I/usr/pkg/include/freetype2 -Dunix=1
-
I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2
-DGLX_GLXEXT_LEGAC
Y -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/usr/X11R6/include  -O2
-fno-strict-al
iasing -O2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2
-DGLX_
GLXEXT_LEGACY -pthread -Wall -Wundef -Wno-ctor-dtor-privacy
./include/wx/wxprec.h:1: internal compiler error: in pch_init, at c-pch.c:135
Please submit a full bug report,
with preprocessed source if appropriate.

In NetBSD GNATS #33820, Johan Wallén came up with a simpler test:
# echo 'extern int foo[8];' > /tmp/test.h
# c++ /tmp/test.h
/tmp/test.h:1: internal compiler error: in pch_init, at c-pch.c:135
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.netbsd.org/Misc/send-pr.html> for instructions.
# ll /tmp/test.h*
-rw-r--r--  1 tk  wheel  19 Jul  1 12:30 /tmp/test.h
-rw-r--r--  1 tk  wheel   0 Jul  1 12:30 /tmp/test.h.gch

With "gcc version 4.2.0 20060615 (experimental)", the error is different:
cc1plus: warning: /tmp/test.h.gch: too short to be a PCH file
resulting in
-rw-rw-r--  1 mrg  wheel       19 Jul  1 03:29 /tmp/test.h
-rw-rw-r--  1 mrg  wheel  1126604 Jul  1 03:29 /tmp/test.h.gch


-- 
           Summary: ICE precompiling headers
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tk at giga dot or dot at
 GCC build triplet: NetBSD-i386-3.99.21
  GCC host triplet: NetBSD-i386-3.99.21
GCC target triplet: NetBSD-i386-3.99.21


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28214

Reply via email to