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
7472f4c9
Commit
7472f4c9
authored
Jul 09, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug168 (dsymonds) + fix
R=ken OCL=31399 CL=31399
parent
5ff7d848
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
src/cmd/8g/cgen.c
src/cmd/8g/cgen.c
+4
-9
test/fixedbugs/bug168.go
test/fixedbugs/bug168.go
+18
-0
No files found.
src/cmd/8g/cgen.c
View file @
7472f4c9
...
...
@@ -91,17 +91,12 @@ cgen(Node *n, Node *res)
// if both are not addressable, use a temporary.
if
(
!
n
->
addable
&&
!
res
->
addable
)
{
if
(
is64
(
n
->
type
))
{
tempalloc
(
&
n1
,
n
->
type
);
cgen
(
n
,
&
n1
);
cgen
(
&
n1
,
res
);
tempfree
(
&
n1
);
return
;
}
regalloc
(
&
n1
,
n
->
type
,
N
);
// could use regalloc here sometimes,
// but have to check for ullman >= UINF.
tempalloc
(
&
n1
,
n
->
type
);
cgen
(
n
,
&
n1
);
cgen
(
&
n1
,
res
);
reg
free
(
&
n1
);
temp
free
(
&
n1
);
return
;
}
...
...
test/fixedbugs/bug168.go
0 → 100644
View file @
7472f4c9
// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug168
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
main
var
g
byte
=
123
;
var
f
*
byte
=
&
g
;
var
b
=
make
([]
byte
,
5
);
func
main
()
{
b
[
0
:
1
][
0
]
=
*
f
;
if
b
[
0
]
!=
123
{
panic
(
"want 123 got "
,
b
[
0
]);
}
}
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