This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/399: interal compiler error with typename/function pointer
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/399: interal compiler error with typename/function pointer
- From: tanis at gaspode dot franken dot de
- Date: 11 Jul 2000 16:49:12 -0000
- Reply-To: tanis at gaspode dot franken dot de
- Resent-Cc: gcc-prs at gcc dot gnu dot org, jason at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, tanis@gaspode.franken.de
>Number: 399
>Category: c++
>Synopsis: interal compiler error with typename/function pointer
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 11 09:56:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: German Tischler
>Release: gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
FreeBSD 5.0-CURRENT i386
>Description:
g++ fails compiling classes with a function pointer
argument which contains a typename statement
>How-To-Repeat:
Source (dumb1.cpp):
template <typename N> struct B
{
typedef N ArgT;
};
template <typename N> N const & c(B<N> const & a) { return 0; }
template <typename N> struct E
{
E(typename B<N>::ArgT (*f) ()) {}
};
E<double>(c<double>);
Commandline:
gcc -v --save-temps -c dumb1.cpp
Output:
Using builtin specs.
gcc version 2.95.2 19991024 (release)
/usr/libexec/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Di386 -Dunix -D__FreeBSD__=5 -D__FreeBSD_cc_version=500001 -D__i386__ -D__unix__ -D__FreeBSD__=5 -D__FreeBSD_cc_version=500001 -D__i386 -D__unix -Acpu(i386) -Amachine(i386) -Asystem(unix) -Asystem(FreeBSD) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__ELF__ dumb1.cpp dumb1.ii
GNU CPP version 2.95.2 19991024 (release) (i386 FreeBSD/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/include/g++
/usr/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/usr/libexec/cc1plus dumb1.ii -quiet -dumpbase dumb1.cc -version -o dumb1.s
GNU C++ version 2.95.2 19991024 (release) (i386-unknown-freebsd) compiled by GNU C version 2.95.2 19991024 (release).
dumb1.cpp:13: Internal compiler error 5.
dumb1.cpp:13: Please submit a full bug report.
dumb1.cpp:13: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>Fix:
unknown
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="dumb1.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="dumb1.ii"
IyAxICJkdW1iMS5jcHAiCnRlbXBsYXRlIDx0eXBlbmFtZSBOPiBzdHJ1Y3QgQgp7Cgl0eXBlZGVm
IE4gQXJnVDsKfTsKCQp0ZW1wbGF0ZSA8dHlwZW5hbWUgTj4gTiBjb25zdCAmIGMoQjxOPiBjb25z
dCAmIGEpIHsgcmV0dXJuIDA7IH0KCnRlbXBsYXRlIDx0eXBlbmFtZSBOPiBzdHJ1Y3QgRQp7CglF
KHR5cGVuYW1lIEI8Tj46OkFyZ1QgKCpmKSAoKSkge30KfTsKCkU8ZG91YmxlPihjPGRvdWJsZT4p
Owo=