Bug 872 - internal error on a certain combination of template classes with static members
Summary: internal error on a certain combination of template classes with static members
Status: CLOSED WONTFIX
Alias: None
Product: Sisyphus
Classification: Development
Component: gcc3.0-c++ (show other bugs)
Version: unstable
Hardware: all Linux
: P4 major
Assignee: Nobody's working on this, feel free to take it
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-23 23:26 MSD by imz
Modified: 2003-08-25 15:18 MSD (History)
0 users

See Also:


Attachments
0000872-test-templ-static-memb.cc (deleted)
2002-04-23 23:26 MSD, imz
no flags Details
0000872-test-templ-static-memb-2.cc (deleted)
2002-04-23 20:24 MSD, imz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description imz 2002-04-23 20:26:43 MSD
Found a work-around (in the second attached file): remove the \"const\" modifiers formt the static field. (Of course, this makes the data less protected.)
Comment 1 imz 2002-04-23 20:26:43 MSD
Found a work-around (in the second attached file): remove the \"const\" modifiers formt the static field. (Of course, this makes the data less protected.)
Comment 2 imz 2002-04-23 23:26:53 MSD
g++ 3.0.4-alt1: Internal error on a short piece of code (with template classes with a static member and a constructor which uses the static member; no \"includes\") -- the code is attached.

(Reported at gcc.gnu.org, id: c++/6423.)
---
Compiling the attached file:

$ g++ -v -save-temps -Wall -ansi -pedantic test-templ-static-memb.cc
Reading specs from /usr/lib/gcc-lib/i586-alt-linux/3.0.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-cstdio=stdio --enable-clocale=generic --enable-languages=c,c++,f77,objc,java --program-suffix=-3.0.4 --enable-objc-gc --with-system-zlib --host=i586-alt-linux
Thread model: posix
gcc version 3.0.4
 /usr/lib/gcc-lib/i586-alt-linux/3.0.4/cpp0 -lang-c++ -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -D__STRICT_ANSI__ -trigraphs -$ -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=4 -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Wall -pedantic -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -D__i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ test-templ-static-memb.cc test-templ-static-memb.ii
GNU CPP version 3.0.4 (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory \"/usr/i586-alt-linux/include\"
#include \"...\" search starts here:
#include <...> search starts here:
 /usr/include/g++-v3
 /usr/include/g++-v3/i586-alt-linux
 /usr/include/g++-v3/backward
 /usr/local/include
 /usr/lib/gcc-lib/i586-alt-linux/3.0.4/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i586-alt-linux/3.0.4/cc1plus -fpreprocessed test-templ-static-memb.ii -trigraphs -$ -quiet -dumpbase test-templ-static-memb.cc -ansi -Wall -pedantic -ansi -version -o test-templ-static-memb.s
GNU CPP version 3.0.4 (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0.4 (i586-alt-linux)
	compiled by GNU C version 3.0.4.
test-templ-static-memb.cc: In function `void 
   __static_initialization_and_destruction_0(int, int)\':
test-templ-static-memb.cc:38: Internal compiler error in emit_move_insn_1, at 
   expr.c:2975
Please submit a full bug report,
with preprocessed source if appropriate.
See &lt;URL:<a href="http://bugs.altlinux.ru/&gt">http://bugs.altlinux.ru/&gt</a>; for instructions.
$ 
---
2.96 compiles this code.

Comment 3 Bug Reporter 2002-07-09 18:01:15 MSD
gcc3.1 released
Comment 4 Bug Reporter 2002-07-09 18:01:15 MSD
gcc3.1 released