re PR c++/46670 (ICE in dependent_type_p, at cp/pt.c:17553)
PR c++/46670 * pt.c (value_dependent_expression_p) [ARRAY_REF]: Handle properly. From-SVN: r167993
This commit is contained in:
parent
a6dd4377db
commit
24de72dbe2
@ -1,3 +1,9 @@
|
||||
2010-12-17 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/46670
|
||||
* pt.c (value_dependent_expression_p) [ARRAY_REF]: Handle
|
||||
properly.
|
||||
|
||||
2010-12-15 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
PR c++/39859
|
||||
|
@ -18108,6 +18108,10 @@ value_dependent_expression_p (tree expression)
|
||||
return ((value_dependent_expression_p (TREE_OPERAND (expression, 0)))
|
||||
|| (value_dependent_expression_p (TREE_OPERAND (expression, 2))));
|
||||
|
||||
case ARRAY_REF:
|
||||
return ((value_dependent_expression_p (TREE_OPERAND (expression, 0)))
|
||||
|| (value_dependent_expression_p (TREE_OPERAND (expression, 1))));
|
||||
|
||||
case ADDR_EXPR:
|
||||
{
|
||||
tree op = TREE_OPERAND (expression, 0);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-12-17 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/46670
|
||||
* g++.dg/cpp0x/constexpr-null1.C: New.
|
||||
|
||||
2010-12-17 Bernd Schmidt <bernds@codesourcery.com>
|
||||
|
||||
* gcc.c-torture/compile/20101217-1.c: New test.
|
||||
|
11
gcc/testsuite/g++.dg/constexpr-null1.C
Normal file
11
gcc/testsuite/g++.dg/constexpr-null1.C
Normal file
@ -0,0 +1,11 @@
|
||||
// PR c++/46670
|
||||
// { dg-options -std=c++0x }
|
||||
|
||||
extern unsigned char __TBB_ReverseByte(unsigned char src);
|
||||
extern unsigned char *reversed;
|
||||
template<typename T> T __TBB_ReverseBits(T src)
|
||||
{
|
||||
unsigned char *original = (unsigned char *) &src;
|
||||
for( int i = sizeof(T)-1; i--; )
|
||||
reversed[i] = __TBB_ReverseByte( original[sizeof(T)-i-1] );
|
||||
}
|
Loading…
Reference in New Issue
Block a user