Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
91ce0ef8
Commit
91ce0ef8
authored
Apr 28, 2009
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 139
R=r OCL=27987 CL=27987
parent
f2714e38
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
src/cmd/6g/cgen.c
src/cmd/6g/cgen.c
+4
-1
test/fixedbugs/bug139.go
test/fixedbugs/bug139.go
+0
-0
test/golden.out
test/golden.out
+0
-5
No files found.
src/cmd/6g/cgen.c
View file @
91ce0ef8
...
...
@@ -632,6 +632,7 @@ bgen(Node *n, int true, Prog *to)
switch
(
n
->
op
)
{
default:
def:
regalloc
(
&
n1
,
n
->
type
,
N
);
cgen
(
n
,
&
n1
);
nodconst
(
&
n2
,
n
->
type
,
0
);
...
...
@@ -644,12 +645,14 @@ bgen(Node *n, int true, Prog *to)
goto
ret
;
case
OLITERAL
:
// need to ask if it is bool?
// need to ask if it is bool?
if
(
!
true
==
!
n
->
val
.
u
.
bval
)
patch
(
gbranch
(
AJMP
,
T
),
to
);
goto
ret
;
case
ONAME
:
if
(
n
->
addable
==
0
)
goto
def
;
nodconst
(
&
n1
,
n
->
type
,
0
);
gins
(
optoas
(
OCMP
,
n
->
type
),
n
,
&
n1
);
a
=
AJNE
;
...
...
test/bugs/bug139.go
→
test/
fixed
bugs/bug139.go
View file @
91ce0ef8
File moved
test/golden.out
View file @
91ce0ef8
...
...
@@ -106,11 +106,6 @@ BUG: compilation succeeds incorrectly
=========== bugs/bug136.go
BUG: should not compile
=========== bugs/bug139.go
bugs/bug139.go:7: fatal error: naddr: ONAME class x 5
BUG should compile
=========== bugs/bug140.go
bugs/bug140.go:6: syntax error near L1
bugs/bug140.go:7: syntax error near L2
...
...
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