mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-21 19:35:36 -05:00
Compare ARRAY_REF and COMPONENT_REF using cp_tree_equal
This commit is contained in:
@@ -8276,10 +8276,6 @@ compare_reflections (tree lhs, tree rhs)
|
||||
{
|
||||
case ARRAY_REF:
|
||||
case COMPONENT_REF:
|
||||
return (TREE_TYPE (lhs) == TREE_TYPE (rhs)
|
||||
&& TREE_OPERAND (lhs, 0) == TREE_OPERAND (rhs, 0)
|
||||
&& TREE_OPERAND (lhs, 1) == TREE_OPERAND (rhs, 1)
|
||||
&& TREE_OPERAND (lhs, 2) == TREE_OPERAND (rhs, 2));
|
||||
case REAL_CST:
|
||||
return cp_tree_equal (lhs, rhs);
|
||||
default:
|
||||
|
||||
@@ -11,6 +11,8 @@ struct S { int m; };
|
||||
template <int &> void fn();
|
||||
int p[2];
|
||||
static_assert(template_arguments_of(^^fn<p[1]>)[0] == reflect_object(p[1]));
|
||||
int pp[2][2];
|
||||
static_assert(template_arguments_of(^^fn<pp[1][1]>)[0] == reflect_object(pp[1][1]));
|
||||
|
||||
template <const int &P>
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user