This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal compiler error on incorrect using declaration.
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Internal compiler error on incorrect using declaration.
- From: Robert Dick <dickrp at EE dot Princeton dot EDU>
- Date: Sun, 6 Aug 2000 23:14:47 -0400 (EDT)
Version 2.95.2
SuSE 6.4 with kernel 2.2.16-SuSE-3
/*===========================================================================*/
Command line: 'gcc -v main.cc'
/*===========================================================================*/
Output
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di486 -D__i486 -D__i486__ gcc-crash.cc /tmp/ccoCyMue.ii
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/include/g++
/usr/local/include
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/../../../../i486-suse-linux/include
End of omitted list.
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/cc1plus /tmp/ccoCyMue.ii -quiet -dumpbase gcc-crash.cc -version -o /tmp/ccOS5vyi.s
GNU C++ version 2.95.2 19991024 (release) (i486-suse-linux) compiled by GNU C version 2.95.2 19991024 (release).
gcc-crash.cc:2: Internal compiler error 980716.
gcc-crash.cc:2: Please submit a full bug report.
gcc-crash.cc:2: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
/*===========================================================================*/
main.cc (which is functionally equivalent to main.ii -- no includes)
struct P { template <typename I> void i(I p) {} };
struct S { using P::i<int>; }
int main() { return 0; }
/*===========================================================================*/
Problem:
According to The Standard, 'using P::i<int>;' is an error. Gcc should give an
error message instead of having an internal compiler error. Fixing this bug
should be considered low-priority.
-Robert Dick-