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
207c82c4
Commit
207c82c4
authored
Mar 20, 2014
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Consider the depth of a nested composite literal during traversal.
Fixes issue 7590. From-SVN: r208731
parent
e70c4c41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
gcc/go/gofrontend/expressions.cc
+14
-0
No files found.
gcc/go/gofrontend/expressions.cc
View file @
207c82c4
...
@@ -13483,6 +13483,20 @@ Composite_literal_expression::do_traverse(Traverse* traverse)
...
@@ -13483,6 +13483,20 @@ Composite_literal_expression::do_traverse(Traverse* traverse)
{
{
// The type may not be resolvable at this point.
// The type may not be resolvable at this point.
Type
*
type
=
this
->
type_
;
Type
*
type
=
this
->
type_
;
for
(
int
depth
=
this
->
depth_
;
depth
>
0
;
--
depth
)
{
if
(
type
->
array_type
()
!=
NULL
)
type
=
type
->
array_type
()
->
element_type
();
else
if
(
type
->
map_type
()
!=
NULL
)
type
=
type
->
map_type
()
->
val_type
();
else
{
// This error will be reported during lowering.
return
TRAVERSE_CONTINUE
;
}
}
while
(
true
)
while
(
true
)
{
{
if
(
type
->
classification
()
==
Type
::
TYPE_NAMED
)
if
(
type
->
classification
()
==
Type
::
TYPE_NAMED
)
...
...
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