http://gcc.gnu.org/bugzilla/show_bug.cgi?id=99
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo.carlini at oracle dot com
--- Comment #21 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Christian Ehrhardt from comment #5)
> From: "Christian Ehrhardt" <[email protected]>
> To: [email protected], [email protected], [email protected],
> [email protected], [email protected], [email protected]
> Cc:
> Subject: Re: c++/99: [2003-03-26] Bug in type in error message.
> Date: Tue, 6 May 2003 15:04:23 +0200
>
> Here's a further reduced testcase, along with some more analysis:
>
> template<typename S> class X {};
> template<typename Q> int f(X<int>, X<Q>);
> template<typename B> int f(X<B>, X<int>);
>
> int main(void) {
> return f(X<int>(), X<int>());
> }
>
For this testcase, the problem is that:
(gdb) p debug_tree(arglist)
<tree_vec 0x7ffff7570d40
elt 0 <template_type_parm 0x7ffff7566348 Q VOID
align 8 symtab 0 alias set -1 canonical type 0x7ffff7566150
index 0 level 1 orig_level 1
chain <type_decl 0x7ffff755fc38 Q>>>
and
(gdb) p debug_tree(arglist)
<tree_vec 0x7ffff7570e60
elt 0 <template_type_parm 0x7ffff7566690 B VOID
align 8 symtab 0 alias set -1 canonical type 0x7ffff7566150
index 0 level 1 orig_level 1
chain <type_decl 0x7ffff755ff18 B>>>
have the same hash:
(gdb) p hash
$128 = 3284467468
I am not sure whether we should change the hashing function or whether we
should add some additional check. But what kind of check?