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
4bb90140
Commit
4bb90140
authored
Mar 03, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash declaring a function named "_".
From-SVN: r170636
parent
86620d2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
gcc/go/gofrontend/parse.cc
+8
-5
No files found.
gcc/go/gofrontend/parse.cc
View file @
4bb90140
...
@@ -2063,9 +2063,12 @@ Parse::function_decl()
...
@@ -2063,9 +2063,12 @@ Parse::function_decl()
return
;
return
;
}
}
this
->
advance_token
();
this
->
advance_token
();
named_object
=
this
->
gogo_
->
declare_function
(
name
,
fntype
,
location
);
if
(
!
Gogo
::
is_sink_name
(
name
))
if
(
named_object
->
is_function_declaration
())
{
named_object
->
func_declaration_value
()
->
set_asm_name
(
asm_name
);
named_object
=
this
->
gogo_
->
declare_function
(
name
,
fntype
,
location
);
if
(
named_object
->
is_function_declaration
())
named_object
->
func_declaration_value
()
->
set_asm_name
(
asm_name
);
}
}
}
// Check for the easy error of a newline before the opening brace.
// Check for the easy error of a newline before the opening brace.
...
@@ -2082,8 +2085,8 @@ Parse::function_decl()
...
@@ -2082,8 +2085,8 @@ Parse::function_decl()
if
(
!
this
->
peek_token
()
->
is_op
(
OPERATOR_LCURLY
))
if
(
!
this
->
peek_token
()
->
is_op
(
OPERATOR_LCURLY
))
{
{
if
(
named_object
==
NULL
)
if
(
named_object
==
NULL
&&
!
Gogo
::
is_sink_name
(
name
)
)
named_object
=
this
->
gogo_
->
declare_function
(
name
,
fntype
,
location
);
this
->
gogo_
->
declare_function
(
name
,
fntype
,
location
);
}
}
else
else
{
{
...
...
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