This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13642] New: Segmentation fault when calling a function template in a function template
- From: "sengir at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jan 2004 07:35:15 -0000
- Subject: [Bug c++/13642] New: Segmentation fault when calling a function template in a function template
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code produces a segmentation fault:
class A{
public:
template<typename T> T *f3();
};
A *a;
template<class T2>
void f2(){
a->f3<T2>();
}
void f1(){
f2<int>();
}
worth mentioning:
- if 'a' isn´t a pointer but an instance of A calling a.f3<T2>() works.
- direct call of f3 in f1 works
- there is another similar case which doesn´t produce a segmentation fault but
a parse error at '>' in f2. however, this is in a file > 1000 lines with
multiple headers, and I couldn´t reproduce it in a small code snippet.
Thank you,
Stefan.
--
Summary: Segmentation fault when calling a function template in a
function template
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P1
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sengir at gmx dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13642