[Bug c++/14007] [3.3/3.4 Regression] Incorrect use of const partial specialization for reference template argument

nathan at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Jun 13 10:02:00 GMT 2004


------- Additional Comments From nathan at gcc dot gnu dot org  2004-06-13 10:02 -------
There is still someting wrong with this patch, which I tried to fix at the summit
on mainline.  Unfortunately the expected set of unexpected failures has changed, 
probably transiently due to the ssa merge, and I've not followed up on that.
Volker Reichelt sent me this test case 
template <typename T> int ref (T&)                { return 0; }
template <typename T> int ref (const volatile T&) { return 1; }

template <typename T> int ptr (T*)                { return 0; }
template <typename T> int ptr (const volatile T*) { return 2; }

void foo (void) {}

int main()
{
    return ref(foo) + ptr(&foo);
}

it should return zero, but does not.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14007



More information about the Gcc-bugs mailing list