Bug 872

Summary: internal error on a certain combination of template classes with static members
Product: Sisyphus Reporter: imz <vanyaz>
Component: gcc3.0-c++Assignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P4    
Version: unstable   
Hardware: all   
OS: Linux   
Attachments:
Description Flags
0000872-test-templ-static-memb.cc
none
0000872-test-templ-static-memb-2.cc none

Description imz 2002-04-23 20:26:43 MSD
Found a work-around (in the second attached file): remove the \&quot;const\&quot; 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 \&quot;const\&quot; 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 \&quot;includes\&quot;) -- 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 \&quot;/usr/i586-alt-linux/include\&quot;
#include \&quot;...\&quot; search starts here:
#include &lt;...&gt; 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