Commit 92a1190c authored by Ken Thompson's avatar Ken Thompson

robs bug converting unsafe.pointer

R=r
OCL=20834
CL=20834
parent 0d9c1abb
...@@ -156,6 +156,7 @@ struct Type ...@@ -156,6 +156,7 @@ struct Type
uchar embedded; // TFIELD embedded type uchar embedded; // TFIELD embedded type
uchar siggen; uchar siggen;
uchar funarg; uchar funarg;
uchar copyany;
// TFUNCT // TFUNCT
uchar thistuple; uchar thistuple;
......
...@@ -1779,6 +1779,8 @@ loop: ...@@ -1779,6 +1779,8 @@ loop:
goto loop; goto loop;
case TANY: case TANY:
if(!st->copyany)
return 0;
*stp = t; *stp = t;
break; break;
...@@ -1841,6 +1843,11 @@ deep(Type *t) ...@@ -1841,6 +1843,11 @@ deep(Type *t)
nt = t; // share from here down nt = t; // share from here down
break; break;
case TANY:
nt = shallow(t);
nt->copyany = 1;
break;
case TPTR32: case TPTR32:
case TPTR64: case TPTR64:
case TCHAN: case TCHAN:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment