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
c9954c63
Commit
c9954c63
authored
Dec 19, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug in [const]
R=r OCL=21569 CL=21569
parent
f38d2b80
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cgen.c
src/cmd/6g/cgen.c
+3
-3
No files found.
src/cmd/6g/cgen.c
View file @
c9954c63
...
@@ -485,7 +485,7 @@ agen(Node *n, Node *res)
...
@@ -485,7 +485,7 @@ agen(Node *n, Node *res)
// constant index
// constant index
if
(
whatis
(
nr
)
==
Wlitint
)
{
if
(
whatis
(
nr
)
==
Wlitint
)
{
v
=
mpgetfix
(
nr
->
val
.
u
.
xval
);
v
=
mpgetfix
(
nr
->
val
.
u
.
xval
);
if
(
is
ptr
darray
(
nl
->
type
))
{
if
(
isdarray
(
nl
->
type
))
{
if
(
!
debug
[
'B'
])
{
if
(
!
debug
[
'B'
])
{
n1
=
n3
;
n1
=
n3
;
...
@@ -536,7 +536,7 @@ agen(Node *n, Node *res)
...
@@ -536,7 +536,7 @@ agen(Node *n, Node *res)
if
(
!
debug
[
'B'
])
{
if
(
!
debug
[
'B'
])
{
// check bounds
// check bounds
if
(
is
ptr
darray
(
nl
->
type
))
{
if
(
isdarray
(
nl
->
type
))
{
n1
=
n3
;
n1
=
n3
;
n1
.
op
=
OINDREG
;
n1
.
op
=
OINDREG
;
n1
.
type
=
types
[
tptr
];
n1
.
type
=
types
[
tptr
];
...
@@ -552,7 +552,7 @@ agen(Node *n, Node *res)
...
@@ -552,7 +552,7 @@ agen(Node *n, Node *res)
patch
(
p1
,
pc
);
patch
(
p1
,
pc
);
}
}
if
(
is
ptr
darray
(
nl
->
type
))
{
if
(
isdarray
(
nl
->
type
))
{
n1
=
n3
;
n1
=
n3
;
n1
.
op
=
OINDREG
;
n1
.
op
=
OINDREG
;
n1
.
type
=
types
[
tptr
];
n1
.
type
=
types
[
tptr
];
...
...
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