summaryrefslogtreecommitdiff
path: root/src/cmd/gc/const.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/gc/const.c')
-rw-r--r--src/cmd/gc/const.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cmd/gc/const.c b/src/cmd/gc/const.c
index 143c1730d..e418b9c56 100644
--- a/src/cmd/gc/const.c
+++ b/src/cmd/gc/const.c
@@ -6,6 +6,7 @@
#include <libc.h>
#include "go.h"
#define TUP(x,y) (((x)<<16)|(y))
+/*c2go int TUP(int, int); */
static Val tocplx(Val);
static Val toflt(Val);
@@ -1565,7 +1566,6 @@ isgoconst(Node *n)
case ORSH:
case OSUB:
case OXOR:
- case OCONV:
case OIOTA:
case OCOMPLEX:
case OREAL:
@@ -1573,7 +1573,12 @@ isgoconst(Node *n)
if(isgoconst(n->left) && (n->right == N || isgoconst(n->right)))
return 1;
break;
-
+
+ case OCONV:
+ if(okforconst[n->type->etype] && isgoconst(n->left))
+ return 1;
+ break;
+
case OLEN:
case OCAP:
l = n->left;