The file to compile comes from the OpenSceneGraph project (version 0.9.1). I have simplified it a little bit. When compiling with the command line: c++ -c AppVisitor.cpp -o AppVisitor.o -I. the following error occurs: osg/ConvexPlanarOccluder:57: internal error: Segmentation fault The same error occurs with the beta version gcc version 3.3 20020909. Release: unknown Environment: Cygwin 1.3.12-2 Pentium III 800MHz Reading specs from /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-cygwin/3.2/specs Configured with: ../gcc/configure --prefix=/usr/local/gcc-3.2 --enable-shared --enable-threads=win32 --enable-languages=c,c++,f77 --disable-libgcj Thread model: win32 gcc version 3.2 How-To-Repeat: With the attached file, the command c++ -c AppVisitor.ii -o AppVisitor.o reproduces the problem.
From: "Giovanni Bajo" <giovannibajo@libero.it> To: <gcc-gnats@gcc.gnu.org>, <o.lauffenburger@topsolid.com>, <gcc-bugs@gcc.gnu.org>, <nobody@gcc.gnu.org>, <gcc-prs@gcc.gnu.org> Cc: "Wolfgang Bangerth" <bangerth@ices.utexas.edu> Subject: Re: c++/7910: [cygwin] Seg fault of g++ 3.2 when compiling OpenSceneGraph 0.9.1 Date: Mon, 7 Apr 2003 01:05:21 +0200 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p r=7910 I can reproduce this only with 3.3 (20030401). Redux is: --------------------------------------------- class __attribute__((dllimport)) Foo { public: virtual void dummy_foo_func(void) {} }; class Bar : public Foo { public: ~Bar(); void dummy_bar_func(); }; Bar::~Bar() {} void Bar::dummy_bar_func() {} --------------------------------------------- pr7910.cpp:20: internal compiler error: Segmentation fault Please submit a full bug report, Notice that Bar's destructor and the other dummy function _must_ be defined out of the class definition for the ICE to happen. 2.95, 3.2 and 3.2.2 compile the code correctly. I can't test with 3.4 (mainline broken for cygwin). 3.3 regression only. Giovanni Bajo
From: mmitchel@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/7910 Date: 12 Apr 2003 20:01:31 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2003-04-12 20:01:30 Modified files: gcc : ChangeLog gcc/config/i386: winnt.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/ext: dllimport1.C Log message: PR c++/7910 * config/i386/winnt.c (i386_pe_mark_dllimport): Fix thinko. PR c++/7910 * g++.dg/ext/dllimport1.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.17417&r2=1.17418 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/winnt.c.diff?cvsroot=gcc&r1=1.42&r2=1.43 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2588&r2=1.2589 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
From: mmitchel@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/7910 Date: 12 Apr 2003 20:03:12 -0000 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: mmitchel@gcc.gnu.org 2003-04-12 20:03:12 Modified files: gcc : ChangeLog gcc/config/i386: winnt.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/ext: dllimport1.C Log message: PR c++/7910 * config/i386/winnt.c (i386_pe_mark_dllimport): Fix thinko. PR c++/7910 * g++.dg/ext/dllimport1.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.433&r2=1.16114.2.434 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/winnt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.37&r2=1.37.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.137&r2=1.2261.2.138 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
State-Changed-From-To: open->closed State-Changed-Why: Fixed in GCC 3.3, GCC 3.4.
State-Changed-From-To: closed->analyzed State-Changed-Why: I reverted my patch, since it caused other problems.
Reconfirmed as of today mainline and 3.3 branch (20030604). Still a regression on both versions.
My recent patchset lets the reduced case pass on 3.4. With modification, the patchset also fixes on 3.3. Danny
Subject: Bug 7910 CVSROOT: /cvs/gcc Module name: gcc Changes by: dannysmith@gcc.gnu.org 2003-07-04 07:42:11 Modified files: gcc : ChangeLog gcc/doc : extend.texi gcc/config/i386: winnt.c Log message: PR c++/5287, PR c++/7910, PR c++/11021 * config/i386/winnt.c (ix86_handle_dll_attribute): Don't add dllimport attribute if function is defined at declaration, but report error instead. Likewise for dllimport'd variable definitions. Set implicit TREE_PUBLIC for dllimport'd variables declared within functions, Report error if dllimport or dllexport symbol is not global. (i386_pe_dllimport_p): Ignore dllimport attribute of functions if defined after declaration or if inlined. Don't allow definition of static data members of C++ classes. Don't dllimport virtual methods. (i386_pe_mark_dllexport): Warn about inconsistent dll attributes. (i386_pe_mark_dllimport): Remove unnecessary checks. (i386_pe_encode_section_info): Warn if the dllimport attribute and symbol prefix have been instantiated and then overridden. * doc/extend.texi: Document dllimport and dllexport attributes. * config/i386/winnt.c (i386_pe_output_labelref): Fix indents. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.325&r2=2.326 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/extend.texi.diff?cvsroot=gcc&r1=1.146&r2=1.147 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/winnt.c.diff?cvsroot=gcc&r1=1.48&r2=1.49
Subject: Bug 7910 CVSROOT: /cvs/gcc Module name: gcc Changes by: dannysmith@gcc.gnu.org 2003-07-04 07:52:38 Modified files: gcc/testsuite : ChangeLog gcc/testsuite/g++.dg/ext: dllimport1.C dllimport2.C dllimport3.C Added files: gcc/testsuite/g++.dg/ext: dllexport1.C dllimport10.C dllimport4.C dllimport5.C dllimport6.C dllimport7.C dllimport8.C dllimport9.C Log message: PR c++/5287, PR c++/7910, PR c++/11021 * testsuite/g++.dg/ext/dllimport1.C: Add mingw32 as target. Add tests for warnings. * testsuite/g++.dg/ext/dllimport2.C: Add tests for warnings. * testsuite/g++.dg/ext/dllimport3.C: Likewise. * testsuite/g++.dg/ext/dllimport4.C: New file. * testsuite/g++.dg/ext/dllimport5.C: New file. * testsuite/g++.dg/ext/dllimport6.C: New file. * testsuite/g++.dg/ext/dllimport7.C: New file. * testsuite/g++.dg/ext/dllimport8.C: New file. * testsuite/g++.dg/ext/dllimport9.C: New file. * testsuite/g++.dg/ext/dllimport10.C: New file. * testsuite/g++.dg/ext/dllexport1.C: New file. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2839&r2=1.2840 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllexport1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport10.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport7.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport8.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport9.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport2.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport3.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
Subject: Bug 7910 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: dannysmith@gcc.gnu.org 2003-07-11 11:54:29 Modified files: gcc : ChangeLog c-decl.c gcc/doc : extend.texi gcc/config/i386: winnt.c Log message: Backport from mainline. 2003-05-13 Richard Henderson <rth@redhat.com> * c-decl.c (duplicate_decls): Re-invoke make_decl_rtl if the old decl had instantiated DECL_RTL. 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net> PR c++/9738 * config/i386/winnt.c (i386_pe_encode_section_info): Enable even if not first. 2003-07-04 Danny Smith <dannysmith@users.sourceforge.net> PR c++/5287, PR c++/7910, PR c++/11021 * config/i386/winnt.c (ix86_handle_dll_attribute): Don't add dllimport attribute if function is defined at declaration, but report error instead. Likewise for dllimport'd variable definitions. Set implicit TREE_PUBLIC for dllimport'd variables declared within functions, Report error if dllimport or dllexport symbol is not global. (i386_pe_dllimport_p): Ignore dllimport attribute of functions if defined after declaration or if inlined. Don't allow definition of static data members of C++ classes. Don't dllimport virtual methods. (i386_pe_mark_dllexport): Warn about inconsistent dll attributes. (i386_pe_mark_dllimport): Remove unnecessary checks. (i386_pe_encode_section_info): Warn if the dllimport attribute and symbol prefix have been instantiated and then overridden. * doc/extend.texi: Document dllimport and dllexport attributes. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.649&r2=1.16114.2.650 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.356.2.10&r2=1.356.2.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/extend.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.109.2.18&r2=1.109.2.19 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/winnt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.37.2.3&r2=1.37.2.4
Subject: Bug 7910 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: dannysmith@gcc.gnu.org 2003-07-11 12:14:43 Modified files: gcc/testsuite : ChangeLog gcc/testsuite/g++.dg/ext: dllimport1.C Added files: gcc/testsuite/g++.dg/ext: dllexport1.C dllimport10.C dllimport2.C dllimport3.C dllimport4.C dllimport5.C dllimport6.C dllimport7.C dllimport8.C dllimport9.C Log message: Backport from mainline. 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net> PR c++/9738 * g++.dg/ext/dllimport2.C: New file. * g++.dg/ext/dllimport3.C: New file. 2003-07-04 Danny Smith <dannysmith@users.sourceforge.net> PR c++/5287, PR c++/7910, PR c++/11021 * testsuite/g++.dg/ext/dllimport1.C: Add mingw32 as target. Add tests for warnings. * g++.dg/ext/dllimport2.C: Add tests for warnings. * g++.dg/ext/dllimport3.C: Likewise. * g++.dg/ext/dllimport4.C: New file. * g++.dg/ext/dllimport5.C: New file. * g++.dg/ext/dllimport6.C: New file. * g++.dg/ext/dllimport7.C: New file. * g++.dg/ext/dllimport8.C: New file. * g++.dg/ext/dllimport9.C: New file. * g++.dg/ext/dllimport10.C: New file. * g++.dg/ext/dllexport1.C: New file. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.227&r2=1.2261.2.228 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllexport1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport10.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.2.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.2.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport5.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport7.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport8.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport9.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1.2.1&r2=1.1.2.2
Confirmed fixed with Danny's patch.