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
8ca93ccf
Commit
8ca93ccf
authored
Mar 03, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash if a constant has a declared but undefined type.
From-SVN: r170632
parent
b58219c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
gcc/go/gofrontend/gogo-tree.cc
+10
-1
No files found.
gcc/go/gofrontend/gogo-tree.cc
View file @
8ca93ccf
...
@@ -926,7 +926,16 @@ Named_object::get_tree(Gogo* gogo, Named_object* function)
...
@@ -926,7 +926,16 @@ Named_object::get_tree(Gogo* gogo, Named_object* function)
{
{
Type
*
type
=
named_constant
->
type
();
Type
*
type
=
named_constant
->
type
();
if
(
type
!=
NULL
&&
!
type
->
is_abstract
())
if
(
type
!=
NULL
&&
!
type
->
is_abstract
())
expr_tree
=
fold_convert
(
type
->
get_tree
(
gogo
),
expr_tree
);
{
if
(
!
type
->
is_undefined
())
expr_tree
=
fold_convert
(
type
->
get_tree
(
gogo
),
expr_tree
);
else
{
// Make sure we report the error.
type
->
base
();
expr_tree
=
error_mark_node
;
}
}
if
(
expr_tree
==
error_mark_node
)
if
(
expr_tree
==
error_mark_node
)
decl
=
error_mark_node
;
decl
=
error_mark_node
;
else
if
(
INTEGRAL_TYPE_P
(
TREE_TYPE
(
expr_tree
)))
else
if
(
INTEGRAL_TYPE_P
(
TREE_TYPE
(
expr_tree
)))
...
...
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