]> Cypherpunks repositories - gostls13.git/commitdiff
fix build on amd64
authorRuss Cox <rsc@golang.org>
Thu, 30 Jul 2009 18:03:58 +0000 (11:03 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 30 Jul 2009 18:03:58 +0000 (11:03 -0700)
R=ken
OCL=32521
CL=32521

src/cmd/5g/ggen.c
src/cmd/6g/ggen.c
src/cmd/6g/list.c
src/cmd/8g/ggen.c

index 9014cb407bacbbef8b8c2dc83a1d2888977bc06f..04fe16ce1284253c371f583b3526c6feb03fbb98 100644 (file)
@@ -68,6 +68,8 @@ compile(Node *fn)
        genlist(curfn->enter);
        genlist(curfn->nbody);
        checklabels();
+       if(nerrors != 0)
+               goto ret;
 
        if(curfn->type->outtuple != 0)
                ginscall(throwreturn, 0);
index ea932e7824409974a3d278322ea8fb108d6b21c0..d0f9ab3f91ad6f418efefae11b05d7ffbd9d3753 100644 (file)
@@ -70,6 +70,8 @@ compile(Node *fn)
        genlist(curfn->nbody);
        gclean();
        checklabels();
+       if(nerrors != 0)
+               goto ret;
 
        if(curfn->type->outtuple != 0)
                ginscall(throwreturn, 0);
index 799bacf9a29c56ba018e08ed6f3f6e67024a7c25..5f71813c55c7532eb10bcba1df466f699a05296a 100644 (file)
@@ -101,7 +101,10 @@ Dconv(Fmt *fp)
                break;
 
        case D_BRANCH:
-               snprint(str, sizeof(str), "%ld", a->branch->loc);
+               if(a->branch == nil)
+                       snprint(str, sizeof(str), "<nil>");
+               else
+                       snprint(str, sizeof(str), "%ld", a->branch->loc);
                break;
 
        case D_EXTERN:
index 3a44d64f01e9d23f8a7fc31af403ffc2327b7d61..ee26a61109040709cbd0adbaba09ad42ac1f5ba8 100644 (file)
@@ -68,6 +68,8 @@ compile(Node *fn)
        genlist(curfn->nbody);
        gclean();
        checklabels();
+       if(nerrors != 0)
+               goto ret;
 
        if(curfn->type->outtuple != 0)
                ginscall(throwreturn, 0);