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
69f232c5
Commit
69f232c5
authored
Apr 28, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Fix some crashes on invalid code.
Fixes issue 7. From-SVN: r186929
parent
fa06ad0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
gcc/go/gofrontend/expressions.cc
+1
-1
gcc/go/gofrontend/types.cc
+10
-1
No files found.
gcc/go/gofrontend/expressions.cc
View file @
69f232c5
...
...
@@ -9225,7 +9225,7 @@ Call_expression::set_results(Translate_context* context, tree call_tree)
ref
->
set_is_lvalue
();
tree
temp_tree
=
ref
->
get_tree
(
context
);
if
(
temp_tree
==
error_mark_node
)
continu
e
;
return
error_mark_nod
e
;
tree
val_tree
=
build3_loc
(
loc
.
gcc_location
(),
COMPONENT_REF
,
TREE_TYPE
(
field
),
call_tree
,
field
,
NULL_TREE
);
...
...
gcc/go/gofrontend/types.cc
View file @
69f232c5
...
...
@@ -5450,6 +5450,11 @@ Array_type::get_length_tree(Gogo* gogo)
mpz_t
val
;
if
(
this
->
length_
->
numeric_constant_value
(
&
nc
)
&&
nc
.
to_int
(
&
val
))
{
if
(
mpz_sgn
(
val
)
<
0
)
{
this
->
length_tree_
=
error_mark_node
;
return
this
->
length_tree_
;
}
Type
*
t
=
nc
.
type
();
if
(
t
==
NULL
)
t
=
Type
::
lookup_integer_type
(
"int"
);
...
...
@@ -6551,7 +6556,11 @@ bool
Interface_type
::
is_identical
(
const
Interface_type
*
t
,
bool
errors_are_identical
)
const
{
go_assert
(
this
->
methods_are_finalized_
&&
t
->
methods_are_finalized_
);
// If methods have not been finalized, then we are asking whether
// func redeclarations are the same. This is an error, so for
// simplicity we say they are never the same.
if
(
!
this
->
methods_are_finalized_
||
!
t
->
methods_are_finalized_
)
return
false
;
// We require the same methods with the same types. The methods
// have already been sorted.
...
...
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