re PR c++/51265 (ICE in finish_decltype_type, at cp/semantics.c:5244)
/cp 2011-11-22 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51265 * semantics.c (finish_decltype_type): Handle PTRMEM_CST. /testsuite 2011-11-22 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51265 * g++.dg/cpp0x/decltype36.C: New. From-SVN: r181638
This commit is contained in:
parent
68cf80fa0b
commit
8733916b60
@ -1,3 +1,8 @@
|
||||
2011-11-22 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51265
|
||||
* semantics.c (finish_decltype_type): Handle PTRMEM_CST.
|
||||
|
||||
2011-11-22 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR c++/51143
|
||||
|
@ -5235,8 +5235,9 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p,
|
||||
gcc_unreachable ();
|
||||
|
||||
case INTEGER_CST:
|
||||
case PTRMEM_CST:
|
||||
/* We can get here when the id-expression refers to an
|
||||
enumerator. */
|
||||
enumerator or non-type template parameter. */
|
||||
type = TREE_TYPE (expr);
|
||||
break;
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-11-22 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51265
|
||||
* g++.dg/cpp0x/decltype36.C: New.
|
||||
|
||||
2011-11-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/51074
|
||||
|
21
gcc/testsuite/g++.dg/cpp0x/decltype36.C
Normal file
21
gcc/testsuite/g++.dg/cpp0x/decltype36.C
Normal file
@ -0,0 +1,21 @@
|
||||
// PR c++/51265
|
||||
// { dg-options -std=c++0x }
|
||||
|
||||
struct Funny
|
||||
{
|
||||
int print(int);
|
||||
};
|
||||
|
||||
template<typename X>
|
||||
void c();
|
||||
|
||||
template<typename X, X ff>
|
||||
void xx()
|
||||
{
|
||||
c<decltype(ff)>();
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
xx<int(Funny::*)(int), &Funny::print>();
|
||||
}
|
Loading…
Reference in New Issue
Block a user