Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
1c7bee05
Commit
1c7bee05
authored
May 29, 2009
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 155
R=r OCL=29619 CL=29619
parent
cc7c31ba
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
ggen.c
src/cmd/6g/ggen.c
+3
-1
bug155.go
test/fixedbugs/bug155.go
+0
-0
golden.out
test/golden.out
+0
-6
No files found.
src/cmd/6g/ggen.c
View file @
1c7bee05
...
@@ -557,13 +557,15 @@ cgen_shift(int op, Node *nl, Node *nr, Node *res)
...
@@ -557,13 +557,15 @@ cgen_shift(int op, Node *nl, Node *nr, Node *res)
Node
n1
,
n2
,
n3
;
Node
n1
,
n2
,
n3
;
int
a
;
int
a
;
Prog
*
p1
;
Prog
*
p1
;
uvlong
sc
;
a
=
optoas
(
op
,
nl
->
type
);
a
=
optoas
(
op
,
nl
->
type
);
if
(
nr
->
op
==
OLITERAL
)
{
if
(
nr
->
op
==
OLITERAL
)
{
regalloc
(
&
n1
,
nl
->
type
,
res
);
regalloc
(
&
n1
,
nl
->
type
,
res
);
cgen
(
nl
,
&
n1
);
cgen
(
nl
,
&
n1
);
if
(
mpgetfix
(
nr
->
val
.
u
.
xval
)
>=
nl
->
type
->
width
*
8
)
{
sc
=
mpgetfix
(
nr
->
val
.
u
.
xval
);
if
(
sc
>=
nl
->
type
->
width
*
8
)
{
// large shift gets 2 shifts by width
// large shift gets 2 shifts by width
nodconst
(
&
n3
,
types
[
TUINT32
],
nl
->
type
->
width
*
8
-
1
);
nodconst
(
&
n3
,
types
[
TUINT32
],
nl
->
type
->
width
*
8
-
1
);
gins
(
a
,
&
n3
,
&
n1
);
gins
(
a
,
&
n3
,
&
n1
);
...
...
test/bugs/bug155.go
→
test/
fixed
bugs/bug155.go
View file @
1c7bee05
File moved
test/golden.out
View file @
1c7bee05
...
@@ -104,12 +104,6 @@ BUG should compile
...
@@ -104,12 +104,6 @@ BUG should compile
5 7
5 7
BUG: should crash
BUG: should crash
=========== bugs/bug155.go
main·f: doasm: notfound from=75 to=13 (82) SHLQ $-9223372036854775808,BX
main·f: doasm: notfound from=75 to=13 (82) SHLQ $-9223372036854775808,BX
main·f: doasm: notfound from=75 to=13 (82) SHLQ $-9223372036854775808,BX
BUG: bug155
=========== bugs/bug156.go
=========== bugs/bug156.go
bugs/bug156.go:7: constant 18446744073709551615 overflows int64
bugs/bug156.go:7: constant 18446744073709551615 overflows int64
BUG: bug156
BUG: bug156
...
...
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