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
6c74ce92
Commit
6c74ce92
authored
Sep 20, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Fix struct hash and equality with _ fields.
From-SVN: r191511
parent
9d12bc68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
gcc/go/gofrontend/expressions.cc
+3
-0
gcc/go/gofrontend/types.cc
+12
-0
No files found.
gcc/go/gofrontend/expressions.cc
View file @
6c74ce92
...
...
@@ -5178,6 +5178,9 @@ Binary_expression::lower_struct_comparison(Gogo* gogo,
pf
!=
fields
->
end
();
++
pf
,
++
field_index
)
{
if
(
Gogo
::
is_sink_name
(
pf
->
field_name
()))
continue
;
if
(
field_index
>
0
)
{
if
(
left_temp
==
NULL
)
...
...
gcc/go/gofrontend/types.cc
View file @
6c74ce92
...
...
@@ -579,6 +579,9 @@ Type::are_compatible_for_comparison(bool is_equality_op, const Type *t1,
p
!=
fields
->
end
();
++
p
)
{
if
(
Gogo
::
is_sink_name
(
p
->
field_name
()))
continue
;
if
(
!
p
->
type
()
->
is_comparable
())
{
if
(
reason
!=
NULL
)
...
...
@@ -4294,6 +4297,9 @@ Struct_type::do_compare_is_identity(Gogo* gogo) const
pf
!=
fields
->
end
();
++
pf
)
{
if
(
Gogo
::
is_sink_name
(
pf
->
field_name
()))
return
false
;
if
(
!
pf
->
type
()
->
compare_is_identity
(
gogo
))
return
false
;
...
...
@@ -4767,6 +4773,9 @@ Struct_type::write_hash_function(Gogo* gogo, Named_type*,
pf
!=
fields
->
end
();
++
pf
)
{
if
(
Gogo
::
is_sink_name
(
pf
->
field_name
()))
continue
;
if
(
first
)
first
=
false
;
else
...
...
@@ -4858,6 +4867,9 @@ Struct_type::write_equal_function(Gogo* gogo, Named_type* name)
pf
!=
fields
->
end
();
++
pf
,
++
field_index
)
{
if
(
Gogo
::
is_sink_name
(
pf
->
field_name
()))
continue
;
// Compare one field in both P1 and P2.
Expression
*
f1
=
Expression
::
make_temporary_reference
(
p1
,
bloc
);
f1
=
Expression
::
make_unary
(
OPERATOR_MULT
,
f1
,
bloc
);
...
...
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