Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
ebb1abc3
Commit
ebb1abc3
authored
Dec 22, 2000
by
Jason Merrill
Committed by
Jason Merrill
Dec 22, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* typeck.c (build_binary_op): Fix pmf comparison logic.
From-SVN: r38471
parent
0692b39c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
15 deletions
+26
-15
gcc/cp/ChangeLog
+2
-2
gcc/cp/typeck.c
+24
-13
No files found.
gcc/cp/ChangeLog
View file @
ebb1abc3
2000-12-22 Jason Merrill <jason@redhat.com>
2000-12-22 Jason Merrill <jason@redhat.com>
* typeck.c (build_binary_op): Fix pmf comparison logic.
* call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
* call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
DECL_STATIC_FUNCTION_P.
DECL_STATIC_FUNCTION_P.
* typeck.c (build_binary_op): Fix pmf comparison logic.
* semantics.c (genrtl_finish_function): Don't try to jump to
* semantics.c (genrtl_finish_function): Don't try to jump to
return_label unless it exists.
return_label unless it exists.
...
...
gcc/cp/typeck.c
View file @
ebb1abc3
...
@@ -3648,6 +3648,11 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
...
@@ -3648,6 +3648,11 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
tree
e1
;
tree
e1
;
tree
e2
;
tree
e2
;
if
(
TREE_SIDE_EFFECTS
(
op0
))
op0
=
save_expr
(
op0
);
if
(
TREE_SIDE_EFFECTS
(
op1
))
op1
=
save_expr
(
op1
);
if
(
flag_new_abi
)
if
(
flag_new_abi
)
{
{
/* We generate:
/* We generate:
...
@@ -3670,7 +3675,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
...
@@ -3670,7 +3675,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
delta1
=
build_component_ref
(
op1
,
delta_identifier
,
delta1
=
build_component_ref
(
op1
,
delta_identifier
,
NULL_TREE
,
0
);
NULL_TREE
,
0
);
e1
=
cp_build_binary_op
(
EQ_EXPR
,
delta0
,
delta1
);
e1
=
cp_build_binary_op
(
EQ_EXPR
,
delta0
,
delta1
);
e2
=
cp_build_binary_op
(
NE
_EXPR
,
e2
=
cp_build_binary_op
(
EQ
_EXPR
,
pfn0
,
pfn0
,
cp_convert
(
TREE_TYPE
(
pfn0
),
cp_convert
(
TREE_TYPE
(
pfn0
),
integer_zero_node
));
integer_zero_node
));
...
@@ -3683,13 +3688,19 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
...
@@ -3683,13 +3688,19 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
/* The code we generate for the test is:
/* The code we generate for the test is:
(op0.index == op1.index
(op0.index == op1.index
&& ((op1.index != -1 && op0.delta2 == op1.delta2)
&& op0.delta == op1.delta
|| op0.pfn == op1.pfn)) */
&& (op1.index == -1 ? op0.pfn == op1.pfn
: op0.delta2 == op1.delta2)) */
tree
index0
=
build_component_ref
(
op0
,
index_identifier
,
tree
index0
=
build_component_ref
(
op0
,
index_identifier
,
NULL_TREE
,
0
);
NULL_TREE
,
0
);
tree
index1
=
save_expr
(
build_component_ref
(
op1
,
index_identifier
,
tree
index1
NULL_TREE
,
0
));
=
save_expr
(
build_component_ref
(
op1
,
index_identifier
,
NULL_TREE
,
0
));
tree
delta0
=
build_component_ref
(
op0
,
delta_identifier
,
NULL_TREE
,
0
);
tree
delta1
=
build_component_ref
(
op1
,
delta_identifier
,
NULL_TREE
,
0
);
tree
pfn0
=
PFN_FROM_PTRMEMFUNC
(
op0
);
tree
pfn0
=
PFN_FROM_PTRMEMFUNC
(
op0
);
tree
pfn1
=
PFN_FROM_PTRMEMFUNC
(
op1
);
tree
pfn1
=
PFN_FROM_PTRMEMFUNC
(
op1
);
tree
delta20
=
DELTA2_FROM_PTRMEMFUNC
(
op0
);
tree
delta20
=
DELTA2_FROM_PTRMEMFUNC
(
op0
);
...
@@ -3698,17 +3709,17 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
...
@@ -3698,17 +3709,17 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
tree
integer_neg_one_node
tree
integer_neg_one_node
=
cp_build_binary_op
(
MINUS_EXPR
,
integer_zero_node
,
=
cp_build_binary_op
(
MINUS_EXPR
,
integer_zero_node
,
integer_one_node
);
integer_one_node
);
e1
=
cp_build_binary_op
(
EQ_EXPR
,
index0
,
index1
);
e1
=
cp_build_binary_op
(
EQ_EXPR
,
index1
,
integer_neg_one_node
);
e2
=
cp_build_binary_op
(
NE_EXPR
,
index1
,
integer_neg_one_node
);
e2
=
cp_build_binary_op
(
TRUTH_ANDIF_EXPR
,
e2
,
cp_build_binary_op
(
EQ_EXPR
,
delta20
,
delta21
));
/* We can't use build_binary_op for this cmp because it
/* We can't use build_binary_op for this cmp because it
would get confused by the ptr to method types and
would get confused by the ptr to method types and
think we want pmfs. */
think we want pmfs. */
e3
=
build
(
EQ_EXPR
,
boolean_type_node
,
pfn0
,
pfn1
);
e2
=
build
(
EQ_EXPR
,
boolean_type_node
,
pfn0
,
pfn1
);
e2
=
cp_build_binary_op
(
TRUTH_ORIF_EXPR
,
e2
,
e3
);
e3
=
cp_build_binary_op
(
EQ_EXPR
,
delta20
,
delta21
);
e
=
cp_build_binary_op
(
TRUTH_ANDIF_EXPR
,
e1
,
e2
);
e
=
build_conditional_expr
(
e1
,
e2
,
e3
);
e1
=
cp_build_binary_op
(
EQ_EXPR
,
index0
,
index1
);
e
=
cp_build_binary_op
(
TRUTH_ANDIF_EXPR
,
e1
,
e
);
e1
=
cp_build_binary_op
(
EQ_EXPR
,
delta0
,
delta1
);
e
=
cp_build_binary_op
(
TRUTH_ANDIF_EXPR
,
e1
,
e
);
}
}
if
(
code
==
EQ_EXPR
)
if
(
code
==
EQ_EXPR
)
return
e
;
return
e
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment