aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index f5e3aab..19f96c8 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -3424,6 +3424,11 @@ value_struct_elt_for_reference (struct type *domain, int offset,
{
for (j = 0; j < len; ++j)
{
+ if (TYPE_CONST (intype) != TYPE_FN_FIELD_CONST (f, j))
+ continue;
+ if (TYPE_VOLATILE (intype) != TYPE_FN_FIELD_VOLATILE (f, j))
+ continue;
+
if (compare_parameters (TYPE_FN_FIELD_TYPE (f, j), intype, 0)
|| compare_parameters (TYPE_FN_FIELD_TYPE (f, j),
intype, 1))