c++/889: ice #390 error in arg_assoc_type, at cp/decl2.c:4930
schmid@snake.iap.physik.tu-darmstadt.de
schmid@snake.iap.physik.tu-darmstadt.de
Sat Nov 25 12:36:00 GMT 2000
>Number: 889
>Category: c++
>Synopsis: ice #390 error in arg_assoc_type, at cp/decl2.c:4930
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Sat Nov 25 12:36:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Peter Schmid
>Release: 2.97 20001120 (experimental)
>Organization:
TU Darmstadt
>Environment:
System: Linux kiste 2.4.0-test10 #20 Thu Nov 2 03:02:57 CET 2000 i686 unknown
Architecture: i686
GNU assembler 001002
GLIBC 2.1.3
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/specs
Configured with: ../gcc-20001120/configure -enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-libstdcxx-v3
gcc version 2.97 20001120 (experimental)
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-20001120/configure -enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-libstdcxx-v3
>Description:
The following simple program crashes the compiler with an internal
compiler error. This code is buggy, since class Times is incomplete,
the class unary_function and the function f are not defined.
>How-To-Repeat:
template <class T>
class Times: private unary_function<T, void>
{
public:
Times():{ }
};
int main()
{
Times<int> t1;
f(t1);
}
Compiling the programm:
g++ -v tf.C
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/specs
Configured with: ../gcc-20001120/configure -enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-libstdcxx-v3
gcc version 2.97 20001120 (experimental)
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/cc1plus -v -D__GNUC__=2 -D__GNUC_MINOR__=97 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ tf.C -lang-c++ -D__GNUG__=2 -D__GXX_ABI_VERSION=100 -quiet -dumpbase tf.C -version -fnew-abi -o /tmp/cc5ct1OU.s
GNU CPP version 2.97 20001120 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 2.97 20001120 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 2.97 20001120 (experimental).
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/g++-v3
/usr/local/include
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/include
/usr/local/i686-pc-linux-gnu/include
/usr/include
End of search list.
tf.C:2: parse error before '<' token
tf.C: In function `int main()':
tf.C:10: aggregate `Times<int> t1' has incomplete type and cannot be
initialized
tf.C:11: Internal error #390.
tf.C:11: Internal compiler error in arg_assoc_type, at cp/decl2.c:4930
confused by earlier errors, bailing out
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list