This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11704] New: ICE in type_dependent_expression_p with wrong method call in template class
- From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jul 2003 08:34:04 -0000
- Subject: [Bug c++/11704] New: ICE in type_dependent_expression_p with wrong method call in template class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11704
Summary: ICE in type_dependent_expression_p with wrong method
call in template class
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nicolas dot burrus at lrde dot epita dot fr
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
When a wrong method call (without the parenthesis) is performed in a
template class, g+++ 3.4 makes an ICE instead of reporting the error.
Environment:
System: Linux ouagadougou 2.4.21 #1 Fri Jul 25 11:19:01 CEST 2003 i686 GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../../lrde/ext/gcc/configure --prefix=/home/lrde/lrde/usr/gcc-3.4 --enable-languages=c,c++ : (reconfigured) : (reconfigured) ../../lrde/ext/gcc/configure --enable-languages=c,c++ --prefix=/home/lrde/lrde/usr/gcc-3.4 : (reconfigured) ../../lrde/ext/gcc/configure --enable-languages=c,c++ --prefix=/home/lrde/lrde/usr/gcc-3.4 : (reconfigured) : (reconfigured) /home/lrde/stud/burrus_n/work/lrde/ext/gcc/configure --prefix=~lrde/usr/gcc-3.4 --enable-languages=c,c++ : (reconfigured) /home/lrde/stud/burrus_n/work/lrde/ext/gcc/configure --prefix=~lrde/usr/gcc-3.4 --enable-languages=c,c++ : (reconfigured) /home/lrde/stud/burrus_n/work/lrde/ext/gcc/configure --prefix=~lrde/usr/gcc-3.4 --enable-languages=c,c++ : (reconfigured) /home/lrde/stud/burrus_n/work/lrde/ext/gcc/configure --prefix=/home/lrde/lrde/usr/gcc-3.4 --enable-languages=c,c++
How-To-Repeat:
Compile this:
struct A
{
int foo()
{
return 5;
}
};
template <class T> // If B is not template it works
struct B
{
bool bar(A& a)
{
return a.foo == 0; // parenthesis to mark method call missing
}
};
------- Additional Comments From nicolas dot burrus at lrde dot epita dot fr 2003-07-29 08:33 -------
Fix:
Don't forget the parenthesis :)