[Bug c++/50848] New: ICE in derived template class missing using for member of template base class
cas43 at cs dot stanford.edu
gcc-bugzilla@gcc.gnu.org
Mon Oct 24 10:28:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50848
Bug #: 50848
Summary: ICE in derived template class missing using for member
of template base class
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: cas43@cs.stanford.edu
Created attachment 25588
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25588
Source file causing ICE
Compiling the attached source file causes g++ to ICE.
Command to reproduce: /home/cas43/new-gcc/inst/bin/g++ prog.cpp
System type: 64-bit Ubuntu Linux
Compiler version:
$ /home/cas43/new-gcc/inst/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/home/cas43/new-gcc/inst/bin/g++
COLLECT_LTO_WRAPPER=/home/cas43/new-gcc/inst/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../current-gcc/configure --prefix=/home/cas43/new-gcc/inst
Thread model: posix
gcc version 4.7.0 20111024 (experimental) (GCC)
OUTPUT:
prog.cpp: In member function ‘void B<T>::f()’:
prog.cpp:2:53: error: there are no arguments to ‘u’ that depend on a template
parameter, so a declaration of ‘u’ must be available [-fpermissive]
prog.cpp:2:53: note: (if you use ‘-fpermissive’, G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
prog.cpp: In instantiation of ‘void B<T>::f() [with T = int]’:
prog.cpp:3:16: required from here
prog.cpp:2:50: error: ‘u’ was not declared in this scope, and no declarations
were found by argument-dependent lookup at the point of instantiation
[-fpermissive]
prog.cpp:2:50: internal compiler error: tree check: expected tree that contains
‘decl minimal’ structure, have ‘indirect_ref’ in tsubst_copy_and_build, at
cp/pt.c:13526
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
More information about the Gcc-bugs
mailing list