[Bug c++/25855] template specialisation not always found (partial ordering)

2006-01-20 Thread janis at gcc dot gnu dot org
--- Comment #12 from janis at gcc dot gnu dot org 2006-01-21 01:24 --- A regression hunt of the trunk on powerpc-linux using the testcase in comment #4 (modified to abort if the result is not 4) identified the following patch to fix several C++ bugs: http://gcc.gnu.org/viewcvs?view=rev&

[Bug c++/25855] template specialisation not always found (partial ordering)

2006-01-19 Thread nathan at gcc dot gnu dot org
--- Comment #11 from nathan at gcc dot gnu dot org 2006-01-19 14:43 --- comment #10 is incorrect. Regardless of the validity/invalidity of the code, the fact that comment#4 shows us producing different code depending on the ordering of the template decls indicates a bug. (I also fail t

[Bug c++/25855] template specialisation not always found (partial ordering)

2006-01-19 Thread pinskia at gcc dot gnu dot org
--- Comment #10 from pinskia at gcc dot gnu dot org 2006-01-19 14:29 --- Here is what is happening here: template int qCompare(const T *t1, const T *t2) { return 1; } template int qCompare(T *t1, T *t2) { return 2; } template int qCompare(const T1 *t1, const T2 *t2) { return 3; } t

[Bug c++/25855] template specialisation not always found (partial ordering)

2006-01-19 Thread nathan at gcc dot gnu dot org
--- Comment #9 from nathan at gcc dot gnu dot org 2006-01-19 14:22 --- The bug appears to be not in the deduction machinery, but in the instantiation machinery. In all cases we end up calling _Z8qCompareIcEiPKT_S2_, but the body of that function differs! Using the example in comment #4

[Bug c++/25855] template specialisation not always found (partial ordering)

2006-01-19 Thread pinskia at gcc dot gnu dot org
--- Comment #8 from pinskia at gcc dot gnu dot org 2006-01-19 14:13 --- 14.7.3/12 has been removed by DR 64. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25855

[Bug c++/25855] template specialisation not always found (partial ordering)

2006-01-19 Thread pinskia at gcc dot gnu dot org
--- Comment #7 from pinskia at gcc dot gnu dot org 2006-01-19 13:53 --- This is also related to PR 12536. I don't think should have been marked as new if it was not obvious if this a bug or not. Nathan, Can you look at this like you did with the other three PRs and see if this is wha

[Bug c++/25855] template specialisation not always found

2006-01-19 Thread rguenth at gcc dot gnu dot org
--- Comment #4 from rguenth at gcc dot gnu dot org 2006-01-19 13:15 --- So, for template int qCompare(const T *t1, const T *t2) { return 1; } template int qCompare(T *t1, T *t2) { return 2; } template int qCompare(const T1 *t1, const T2 *t2) { return 3; } template<> int qCompare(co

[Bug c++/25855] template specialisation not always found

2006-01-19 Thread rguenth at gcc dot gnu dot org
--- Comment #3 from rguenth at gcc dot gnu dot org 2006-01-19 13:09 --- 14.7.3/11 and /12 suggest, that while having the template-argument unspecified in the template-id is valid only if the template-argument can be deduced from the function arguments unambiguously (it does not say if a

[Bug c++/25855] template specialisation not always found

2006-01-19 Thread mueller at kde dot org
--- Comment #2 from mueller at kde dot org 2006-01-19 11:13 --- attaching testcase inline for better bugzilla queries: #ifdef BREAK templatebool qCompare(const T *t1, const T *t2); templatebool qCompare(T *t1, T *t2); #else template

[Bug c++/25855] template specialisation not always found

2006-01-19 Thread mueller at kde dot org
--- Comment #1 from mueller at kde dot org 2006-01-19 11:12 --- Created an attachment (id=10674) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10674&action=view) testcase -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25855