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
480cc899
Commit
480cc899
authored
Dec 22, 2010
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash if a temporary is not defined due to errors.
From-SVN: r168173
parent
1d9fa70c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
gcc/go/gofrontend/statements.cc
+13
-0
gcc/go/gofrontend/statements.h
+1
-5
No files found.
gcc/go/gofrontend/statements.cc
View file @
480cc899
...
...
@@ -299,6 +299,19 @@ Temporary_statement::type() const
return
this
->
type_
!=
NULL
?
this
->
type_
:
this
->
init_
->
type
();
}
// Return the tree for the temporary variable.
tree
Temporary_statement
::
get_decl
()
const
{
if
(
this
->
decl_
==
NULL
)
{
gcc_assert
(
saw_errors
());
return
error_mark_node
;
}
return
this
->
decl_
;
}
// Traversal.
int
...
...
gcc/go/gofrontend/statements.h
View file @
480cc899
...
...
@@ -487,11 +487,7 @@ class Temporary_statement : public Statement
// Return the tree for the temporary variable itself. This should
// not be called until after the statement itself has been expanded.
tree
get_decl
()
const
{
gcc_assert
(
this
->
decl_
!=
NULL
);
return
this
->
decl_
;
}
get_decl
()
const
;
protected
:
int
...
...
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