change *map to map; *chan to chan; new(T) to new(*T)
fix bugs left over from *[] to [] conversion.

TBR=r
OCL=21576
CL=21581
diff --git a/test/235.go b/test/235.go
index 47d6b58a..4ff7c30 100644
--- a/test/235.go
+++ b/test/235.go
@@ -8,10 +8,10 @@
 
 type T chan uint64;
 
-func M(f uint64) (in, out *T) {
+func M(f uint64) (in, out T) {
 	in = new(T, 100);
 	out = new(T, 100);
-	go func(in, out *T, f uint64) {
+	go func(in, out T, f uint64) {
 		for {
 			out <- f * <-in;
 		}
@@ -44,8 +44,8 @@
 		1250, 1280, 1296, 1350, 1440, 1458, 1500, 1536, 1600 };
 
 	x := uint64(1);
-	ins := new([]*T, n);
-	outs := new([]*T, n);
+	ins := new([]T, n);
+	outs := new([]T, n);
 	xs := new([]uint64, n);
 	for i := 0; i < n; i++ {
 		ins[i], outs[i] = M(F[i]);
@@ -61,7 +61,7 @@
 		for i := 0; i < n; i++ {
 			if xs[i] == x { xs[i] = <- outs[i]; }
 		}
-		
+
 		x = min(xs);
 		if x != OUT[i] { panic("bad: ", x, " should be ", OUT[i]); }
 	}
diff --git a/test/bugs/bug121.go b/test/bugs/bug121.go
index cc960e3..cea6f1b 100644
--- a/test/bugs/bug121.go
+++ b/test/bugs/bug121.go
@@ -21,5 +21,5 @@
 func (s *S) h() {}  // here we can't write (s *S) T either
 
 func main() {
-	var i I = new(S);
+	var i I = new(*S);
 }
diff --git a/test/chan/fifo.go b/test/chan/fifo.go
index 1152a6d..eef494d 100644
--- a/test/chan/fifo.go
+++ b/test/chan/fifo.go
@@ -23,7 +23,7 @@
 	}
 }
 
-func Chain(ch *<-chan int, val int, in *<-chan int, out *chan<- int) {
+func Chain(ch <-chan int, val int, in <-chan int, out chan<- int) {
 	<-in;
 	if <-ch != val {
 		panic(val)
diff --git a/test/chan/goroutines.go b/test/chan/goroutines.go
index 3fd80f2..afc5ead 100644
--- a/test/chan/goroutines.go
+++ b/test/chan/goroutines.go
@@ -14,7 +14,7 @@
 	"strconv";
 )
 
-func f(left, right *chan int) {
+func f(left, right chan int) {
 	left <- <-right;
 }
 
@@ -36,6 +36,6 @@
 		go f(left, right);
 		left = right;
 	}
-	go func(c *chan int) { c <- 1 }(right);
+	go func(c chan int) { c <- 1 }(right);
 	<-leftmost;
 }
diff --git a/test/chan/nonblock.go b/test/chan/nonblock.go
index 5622e83..4d36bdb 100644
--- a/test/chan/nonblock.go
+++ b/test/chan/nonblock.go
@@ -13,35 +13,35 @@
 	for i:=0; i<100; i++ { sys.gosched() }
 }
 
-func i32receiver(c *chan int32) {
+func i32receiver(c chan int32) {
 	if <-c != 123 { panic("i32 value") }
 }
 
-func i32sender(c *chan int32) {
+func i32sender(c chan int32) {
 	c <- 234
 }
 
-func i64receiver(c *chan int64) {
+func i64receiver(c chan int64) {
 	if <-c != 123456 { panic("i64 value") }
 }
 
-func i64sender(c *chan int64) {
+func i64sender(c chan int64) {
 	c <- 234567
 }
 
-func breceiver(c *chan bool) {
+func breceiver(c chan bool) {
 	if ! <-c { panic("b value") }
 }
 
-func bsender(c *chan bool) {
+func bsender(c chan bool) {
 	c <- true
 }
 
-func sreceiver(c *chan string) {
+func sreceiver(c chan string) {
 	if <-c != "hello" { panic("s value") }
 }
 
-func ssender(c *chan string) {
+func ssender(c chan string) {
 	c <- "hello again"
 }
 
@@ -57,19 +57,19 @@
 		c64 := new(chan int64, buffer);
 		cb := new(chan bool, buffer);
 		cs := new(chan string, buffer);
-	
+
 		i32, ok = <-c32;
 		if ok { panic("blocked i32sender") }
-	
+
 		i64, ok = <-c64;
 		if ok { panic("blocked i64sender") }
-	
+
 		b, ok = <-cb;
 		if ok { panic("blocked bsender") }
-	
+
 		s, ok = <-cs;
 		if ok { panic("blocked ssender") }
-	
+
 		go i32receiver(c32);
 		pause();
 		ok = c32 <- 123;
@@ -79,7 +79,7 @@
 		i32, ok = <-c32;
 		if !ok { panic("i32sender") }
 		if i32 != 234 { panic("i32sender value") }
-	
+
 		go i64receiver(c64);
 		pause();
 		ok = c64 <- 123456;
@@ -89,7 +89,7 @@
 		i64, ok = <-c64;
 		if !ok { panic("i64sender") }
 		if i64 != 234567 { panic("i64sender value") }
-	
+
 		go breceiver(cb);
 		pause();
 		ok = cb <- true;
@@ -99,7 +99,7 @@
 		b, ok = <-cb;
 		if !ok { panic("bsender") }
 		if !b{ panic("bsender value") }
-	
+
 		go sreceiver(cs);
 		pause();
 		ok = cs <- "hello";
diff --git a/test/chan/powser1.go b/test/chan/powser1.go
index 8222de0..a010f69 100644
--- a/test/chan/powser1.go
+++ b/test/chan/powser1.go
@@ -30,8 +30,8 @@
 }
 
 type dch struct {
-	req *chan  int;
-	dat *chan  item;
+	req chan  int;
+	dat chan  item;
 	nam int;
 }
 
@@ -46,7 +46,7 @@
 func mkdch() *dch {
 	c := chnameserial % len(chnames);
 	chnameserial++;
-	d := new(dch);
+	d := new(*dch);
 	d.req = new(chan int);
 	d.dat = new(chan item);
 	d.nam = c;
@@ -54,7 +54,7 @@
 }
 
 func mkdch2() *dch2 {
-	d2 := new(dch2);
+	d2 := new(*dch2);
 	d2[0] = mkdch();
 	d2[1] = mkdch();
 	return d2;
@@ -74,7 +74,7 @@
 // a signal on the release-wait channel tells the next newer
 // generation to begin servicing out[1].
 
-func dosplit(in *dch, out *dch2, wait *chan int ){
+func dosplit(in *dch, out *dch2, wait chan int ){
 	var t *dch;
 	both := false;	// do not service both channels
 
@@ -127,9 +127,9 @@
 func getn(in []*dch, n int) []item {
 	// BUG n:=len(in);
 	if n != 2 { panic("bad n in getn") };
-	req := new([2] *chan int);
-	dat := new([2] *chan item);
-	out := new([2] item);
+	req := new(*[2] chan int);
+	dat := new(*[2] chan item);
+	out := new([]item, 2);
 	var i int;
 	var it item;
 	for i=0; i<n; i++ {
@@ -159,11 +159,8 @@
 
 // Get one item from each of 2 demand channels
 
-func get2(in0 *dch, in1 *dch)  []item {
-	x := new([2] *dch);
-	x[0] = in0;
-	x[1] = in1;
-	return getn(x, 2);
+func get2(in0 *dch, in1 *dch) []item {
+	return getn([]*dch{in0, in1}, 2);
 }
 
 func copy(in *dch, out *dch){
@@ -211,7 +208,7 @@
 
 func i2tor(u, v int64) *rat{
 	g := gcd(u,v);
-	r := new(rat);
+	r := new(*rat);
 	if v > 0 {
 		r.num = u/g;
 		r.den = v/g;
@@ -249,7 +246,7 @@
 func mul(u, v *rat) *rat{
 	g1 := gcd(u.num,v.den);
 	g2 := gcd(u.den,v.num);
-	r := new(rat);
+	r := new(*rat);
 	r.num =(u.num/g1)*(v.num/g2);
 	r.den = (u.den/g2)*(v.den/g1);
 	return r;
@@ -649,7 +646,7 @@
 		check(Ones, one, 5, "Ones");
 		check(Add(Ones, Ones), itor(2), 0, "Add Ones Ones");  // 1 1 1 1 1
 		check(Add(Ones, Twos), itor(3), 0, "Add Ones Twos"); // 3 3 3 3 3
-		a := new([N] *rat);
+		a := new([] *rat, N);
 		d := Diff(Ones);
 		// BUG: want array initializer
 		for i:=0; i < N; i++ {
diff --git a/test/chan/powser2.go b/test/chan/powser2.go
index c72c2fa..5f2d1dc 100644
--- a/test/chan/powser2.go
+++ b/test/chan/powser2.go
@@ -35,8 +35,8 @@
 }
 
 type dch struct {
-	req *chan  int;
-	dat *chan  item;
+	req chan  int;
+	dat chan  item;
 	nam int;
 }
 
@@ -51,7 +51,7 @@
 func mkdch() *dch {
 	c := chnameserial % len(chnames);
 	chnameserial++;
-	d := new(dch);
+	d := new(*dch);
 	d.req = new(chan int);
 	d.dat = new(chan item);
 	d.nam = c;
@@ -59,7 +59,7 @@
 }
 
 func mkdch2() *dch2 {
-	d2 := new(dch2);
+	d2 := new(*dch2);
 	d2[0] = mkdch();
 	d2[1] = mkdch();
 	return d2;
@@ -79,7 +79,7 @@
 // a signal on the release-wait channel tells the next newer
 // generation to begin servicing out[1].
 
-func dosplit(in *dch, out *dch2, wait *chan int ){
+func dosplit(in *dch, out *dch2, wait chan int ){
 	var t *dch;
 	both := false;	// do not service both channels
 
@@ -132,9 +132,9 @@
 func getn(in []*dch, n int) []item {
 	// BUG n:=len(in);
 	if n != 2 { panic("bad n in getn") };
-	req := new([2] *chan int);
-	dat := new([2] *chan item);
-	out := new([2] item);
+	req := new([] chan int, 2);
+	dat := new([] chan item, 2);
+	out := new([]item, 2);
 	var i int;
 	var it item;
 	for i=0; i<n; i++ {
@@ -165,10 +165,7 @@
 // Get one item from each of 2 demand channels
 
 func get2(in0 *dch, in1 *dch)  []item {
-	x := new([2] *dch);
-	x[0] = in0;
-	x[1] = in1;
-	return getn(x, 2);
+	return getn([]*dch{in0, in1}, 2);
 }
 
 func copy(in *dch, out *dch){
@@ -216,7 +213,7 @@
 
 func i2tor(u, v int64) *rat{
 	g := gcd(u,v);
-	r := new(rat);
+	r := new(*rat);
 	if v > 0 {
 		r.num = u/g;
 		r.den = v/g;
@@ -254,7 +251,7 @@
 func mul(u, v *rat) *rat{
 	g1 := gcd(u.num,v.den);
 	g2 := gcd(u.den,v.num);
-	r := new(rat);
+	r := new(*rat);
 	r.num =(u.num/g1)*(v.num/g2);
 	r.den = (u.den/g2)*(v.den/g1);
 	return r;
@@ -654,7 +651,7 @@
 		check(Ones, one, 5, "Ones");
 		check(Add(Ones, Ones), itor(2), 0, "Add Ones Ones");  // 1 1 1 1 1
 		check(Add(Ones, Twos), itor(3), 0, "Add Ones Twos"); // 3 3 3 3 3
-		a := new([N] *rat);
+		a := new([]*rat, N);
 		d := Diff(Ones);
 		// BUG: want array initializer
 		for i:=0; i < N; i++ {
diff --git a/test/chan/select.go b/test/chan/select.go
index 470e151..3158ee6 100644
--- a/test/chan/select.go
+++ b/test/chan/select.go
@@ -14,7 +14,7 @@
   return 1 << shift
 }
 
-func Send(a, b *chan uint) int {
+func Send(a, b chan uint) int {
   var i int;
   LOOP:
     for {
diff --git a/test/chan/sieve.go b/test/chan/sieve.go
index f45373b..b6bcdb3 100644
--- a/test/chan/sieve.go
+++ b/test/chan/sieve.go
@@ -10,7 +10,7 @@
 package main
 
 // Send the sequence 2, 3, 4, ... to channel 'ch'.
-func Generate(ch *chan<- int) {
+func Generate(ch chan<- int) {
 	for i := 2; ; i++ {
 		ch <- i  // Send 'i' to channel 'ch'.
 	}
@@ -18,7 +18,7 @@
 
 // Copy the values from channel 'in' to channel 'out',
 // removing those divisible by 'prime'.
-func Filter(in *<-chan int, out *chan<- int, prime int) {
+func Filter(in <-chan int, out chan<- int, prime int) {
 	for {
 		i := <-in;  // Receive value of new variable 'i' from 'in'.
 		if i % prime != 0 {
@@ -28,7 +28,7 @@
 }
 
 // The prime sieve: Daisy-chain Filter processes together.
-func Sieve(primes *chan<- int) {
+func Sieve(primes chan<- int) {
 	ch := new(chan int);  // Create a new channel.
 	go Generate(ch);  // Start Generate() as a subprocess.
 	for {
diff --git a/test/complit.go b/test/complit.go
index 43f09041..ca3c8e0 100644
--- a/test/complit.go
+++ b/test/complit.go
@@ -11,7 +11,7 @@
 type R struct { num int }
 
 func itor(a int) *R {
-	r := new(R);
+	r := new(*R);
 	r.num = a;
 	return r;
 }
@@ -49,12 +49,12 @@
 	if len(at) != 3 { panic("at") }
 
 	c := new(chan int);
-	ac := []*chan int{c, c, c};
+	ac := []chan int{c, c, c};
 	if len(ac) != 3 { panic("ac") }
 
 	aat := [][len(at)]*T{at, at};
 	if len(aat) != 2 || len(aat[1]) != 3 { panic("at") }
-	
+
 	s := string([]byte{'h', 'e', 'l', 'l', 'o'});
 	if s != "hello" { panic("s") }
 
@@ -62,7 +62,7 @@
 	if len(m) != 3 { panic("m") }
 
 	eq(&[]*R{itor(0), itor(1), itor(2), itor(3), itor(4), itor(5)});
-	
+
 	p1 := NewP(1, 2);
 	p2 := NewP(1, 2);
 	if p1 == p2 { panic("NewP") }
diff --git a/test/fixedbugs/bug011.go b/test/fixedbugs/bug011.go
index 63673c0..c2d9cde 100644
--- a/test/fixedbugs/bug011.go
+++ b/test/fixedbugs/bug011.go
@@ -16,7 +16,7 @@
 }
 
 func main() {
-	var t *T = new(T);
+	var t *T = new(*T);
 	t.x = 1;
 	t.y = 2;
 	r10 := t.m(1, 3.0);
diff --git a/test/fixedbugs/bug026.go b/test/fixedbugs/bug026.go
index 1d97c18..d8a1d778 100644
--- a/test/fixedbugs/bug026.go
+++ b/test/fixedbugs/bug026.go
@@ -18,8 +18,8 @@
 
 func main() {
 	type I struct { val int; };  // BUG: can't be local; works if global
-	v := new(Vector);
-	v.Insert(0, new(I));
+	v := new(*Vector);
+	v.Insert(0, new(*I));
 }
 /*
 check: main_sigs_I: not defined
diff --git a/test/fixedbugs/bug027.go b/test/fixedbugs/bug027.go
index 2c595cb..95bc064 100644
--- a/test/fixedbugs/bug027.go
+++ b/test/fixedbugs/bug027.go
@@ -15,9 +15,9 @@
 }
 
 func New() *Vector {
-	v := new(Vector);
+	v := new(*Vector);
 	v.nelem = 0;
-	v.elem = new([10]Element);
+	v.elem = new(*[10]Element);
 	return v;
 }
 
@@ -33,11 +33,11 @@
 type I struct { val int; };  // BUG: can't be local;
 
 func main() {
-	i0 := new(I); i0.val = 0;
-	i1 := new(I); i1.val = 11;
-	i2 := new(I); i2.val = 222;
-	i3 := new(I); i3.val = 3333;
-	i4 := new(I); i4.val = 44444;
+	i0 := new(*I); i0.val = 0;
+	i1 := new(*I); i1.val = 11;
+	i2 := new(*I); i2.val = 222;
+	i3 := new(*I); i3.val = 3333;
+	i4 := new(*I); i4.val = 44444;
 	v := New();
 	print("hi\n");
 	v.Insert(i4);
diff --git a/test/fixedbugs/bug038.go b/test/fixedbugs/bug038.go
index 7585376..444a042 100644
--- a/test/fixedbugs/bug038.go
+++ b/test/fixedbugs/bug038.go
@@ -9,5 +9,5 @@
 
 func main() {
 	var z [3]byte;
-	z := new([3]byte);  // BUG redeclaration
+	z := new(*[3]byte);  // BUG redeclaration
 }
diff --git a/test/fixedbugs/bug045.go b/test/fixedbugs/bug045.go
index d8a712c..9e94f44 100644
--- a/test/fixedbugs/bug045.go
+++ b/test/fixedbugs/bug045.go
@@ -13,7 +13,7 @@
 func main() {
 	var ta []*T;
 
-	ta = new([1]*T);
+	ta = new(*[1]*T);
 	ta[0] = nil;
 }
 /*
diff --git a/test/fixedbugs/bug054.go b/test/fixedbugs/bug054.go
index decf584..f4d7c27 100644
--- a/test/fixedbugs/bug054.go
+++ b/test/fixedbugs/bug054.go
@@ -30,12 +30,12 @@
 }
 
 func main() {
-	v := new(Vector);
-	v.elem = new([10]Element);
-	t := new(TStruct);
+	v := new(*Vector);
+	v.elem = new(*[10]Element);
+	t := new(*TStruct);
 	t.name = "hi";
 	v.elem[0] = t;
-	s := new(TStruct);
+	s := new(*TStruct);
 	s.name = "foo";
 	s.fields = v;
 	if s.field(0).name != "hi" {
diff --git a/test/fixedbugs/bug058.go b/test/fixedbugs/bug058.go
index f441815..2cfe19d 100644
--- a/test/fixedbugs/bug058.go
+++ b/test/fixedbugs/bug058.go
@@ -7,8 +7,8 @@
 package main
 
 type Box struct {};
-var m *map[string] *Box;
-  
+var m map[string] *Box;
+
 func main() {
   m := new(map[string] *Box);
   s := "foo";
diff --git a/test/fixedbugs/bug059.go b/test/fixedbugs/bug059.go
index 5a29ed1..55c05f6 100644
--- a/test/fixedbugs/bug059.go
+++ b/test/fixedbugs/bug059.go
@@ -20,7 +20,7 @@
 
 func main() {
 	m := new(map[string] []string);
-	as := new([2]string);
+	as := new(*[2]string);
 	as[0] = "0";
 	as[1] = "1";
 	m["0"] = as;
diff --git a/test/fixedbugs/bug066.go b/test/fixedbugs/bug066.go
index ab69257..4f64152 100644
--- a/test/fixedbugs/bug066.go
+++ b/test/fixedbugs/bug066.go
@@ -12,7 +12,7 @@
 )
 
 type Scope struct {
-	entries *map[string] *Object;
+	entries map[string] *Object;
 }
 
 
diff --git a/test/fixedbugs/bug067.go b/test/fixedbugs/bug067.go
index fd22cd6..1e747eb 100644
--- a/test/fixedbugs/bug067.go
+++ b/test/fixedbugs/bug067.go
@@ -6,7 +6,7 @@
 
 package main
 
-var c *chan int
+var c chan int
 
 func main() {
 	c = new(chan int);
diff --git a/test/fixedbugs/bug069.go b/test/fixedbugs/bug069.go
index 51e034d..2e53846 100644
--- a/test/fixedbugs/bug069.go
+++ b/test/fixedbugs/bug069.go
@@ -13,6 +13,6 @@
 
 	i, ok = <-c;  // works
 
-	ca := new([2]*chan int);
+	ca := new(*[2]chan int);
 	i, ok = <-(ca[0]);  // fails: c.go:11: bad shape across assignment - cr=1 cl=2
 }
diff --git a/test/fixedbugs/bug071.go b/test/fixedbugs/bug071.go
index 8af5462..665a441 100644
--- a/test/fixedbugs/bug071.go
+++ b/test/fixedbugs/bug071.go
@@ -14,7 +14,7 @@
 }
 
 type dch struct {
-	dat *chan  *rat;
+	dat chan  *rat;
 }
 
 func dosplit(in *dch){
diff --git a/test/fixedbugs/bug075.go b/test/fixedbugs/bug075.go
index 01b0fe0..c1b8647 100644
--- a/test/fixedbugs/bug075.go
+++ b/test/fixedbugs/bug075.go
@@ -6,9 +6,9 @@
 
 package main
 
-type T struct { m *map[int]int }
+type T struct { m map[int]int }
 func main() {
-	t := new(T);
+	t := new(*T);
 	t.m = new(map[int]int);
 	var x int;
 	var ok bool;
diff --git a/test/fixedbugs/bug078.go b/test/fixedbugs/bug078.go
index 3ffadb7..ddd3fae 100644
--- a/test/fixedbugs/bug078.go
+++ b/test/fixedbugs/bug078.go
@@ -6,7 +6,7 @@
 
 package main
 
-func dosplit(wait *chan int ){
+func dosplit(wait chan int ){
 	select {
 	case <-wait:
 	}
diff --git a/test/fixedbugs/bug084.go b/test/fixedbugs/bug084.go
index a5ccdb3..138b6da 100644
--- a/test/fixedbugs/bug084.go
+++ b/test/fixedbugs/bug084.go
@@ -18,6 +18,6 @@
 
 func main() {
 	c := new(chan string);
-	a := new(Service);
+	a := new(*Service);
 	go a.Serve(1234);
 }
diff --git a/test/fixedbugs/bug099.go b/test/fixedbugs/bug099.go
index f76f0e8..2b1776c 100644
--- a/test/fixedbugs/bug099.go
+++ b/test/fixedbugs/bug099.go
@@ -18,7 +18,7 @@
 // if you take it out (and the 0s below)
 // then the bug goes away.
 func NewI(i int) I {
-	return new(S)
+	return new(*S)
 }
 
 // Uses interface method.
diff --git a/test/fixedbugs/bug111.go b/test/fixedbugs/bug111.go
index 39da9b4..ee61cd8 100644
--- a/test/fixedbugs/bug111.go
+++ b/test/fixedbugs/bug111.go
@@ -22,7 +22,7 @@
 }
 
 func main() {
-	s := new(Stucky);
+	s := new(*Stucky);
 	i := s.Me();
 	j := i.Me();
 	j.Me();
diff --git a/test/fixedbugs/bug118.go b/test/fixedbugs/bug118.go
index 778b533..d508d83 100644
--- a/test/fixedbugs/bug118.go
+++ b/test/fixedbugs/bug118.go
@@ -6,7 +6,7 @@
 
 package main
 
-export func Send(c *chan int) int {
+export func Send(c chan int) int {
   select {
   default:
     return 1;
diff --git a/test/func.go b/test/func.go
index ee9414d..7b15f74 100644
--- a/test/func.go
+++ b/test/func.go
@@ -81,7 +81,7 @@
 	r9, s9 := f9(1);
 	assertequal(r9, 9, "r9");
 	assertequal(int(s9), 9, "s9");
-	var t *T = new(T);
+	var t *T = new(*T);
 	t.x = 1;
 	t.y = 2;
 	r10 := t.m10(1, 3.0);
diff --git a/test/hashmap.go b/test/hashmap.go
index 86a3422..d458b8c 100755
--- a/test/hashmap.go
+++ b/test/hashmap.go
@@ -64,7 +64,7 @@
 
 func (m *HashMap) Initialize (initial_log2_capacity uint32) {
 	m.log2_capacity_ = initial_log2_capacity;
-	m.map_ = new([1024] Entry);
+	m.map_ = new(*[1024] Entry);
 	m.Clear();
 }
 
@@ -74,7 +74,7 @@
 
 	var i uint32 = key.Hash() % m.capacity();
 	ASSERT(0 <= i && i < m.capacity());
-	
+
 	ASSERT(m.occupancy_ < m.capacity());	// guarantees loop termination
 	for m.map_[i].key != nil && !m.map_[i].key.Match(key) {
 		i++;
@@ -82,7 +82,7 @@
 			i = 0;
 		}
 	}
-	
+
 	return &m.map_[i];
 }
 
@@ -102,13 +102,13 @@
 		p.key = key;
 		p.value = nil;
 		m.occupancy_++;
-	
+
 		// Grow the map if we reached >= 80% occupancy.
 		if m.occupancy_ + m.occupancy_/4 >= m.capacity() {
 			m.Resize();
 			p = m.Probe(key);
 		}
-		
+
 		return p;
 	}
 
@@ -120,10 +120,10 @@
 func (m *HashMap) Resize() {
 	var hmap *[1024] Entry = m.map_;
 	var n uint32 = m.occupancy_;
-	
+
 	// Allocate a new map of twice the current size.
 	m.Initialize(m.log2_capacity_ << 1);
-	
+
 	// Rehash all current entries.
 	var i uint32 = 0;
 	for n > 0 {
@@ -157,7 +157,7 @@
 
 
 func MakeNumber (x uint32) *Number {
-	var n *Number = new(Number);
+	var n *Number = new(*Number);
 	n.x = x;
 	return n;
 }
@@ -167,18 +167,18 @@
 	//f unc (n int) int { return n + 1; }(1);
 
 	//print "HashMap - gri 2/8/2008\n";
-	
-	var hmap *HashMap = new(HashMap);
+
+	var hmap *HashMap = new(*HashMap);
 	hmap.Initialize(0);
-	
+
 	var x1 *Number = MakeNumber(1001);
 	var x2 *Number = MakeNumber(2002);
 	var x3 *Number = MakeNumber(3003);
-	
+
 	// this doesn't work I think...
 	//hmap.Lookup(x1, true);
 	//hmap.Lookup(x2, true);
 	//hmap.Lookup(x3, true);
-	
+
 	//print "done\n";
 }
diff --git a/test/hilbert.go b/test/hilbert.go
index b2b916b..415e957 100644
--- a/test/hilbert.go
+++ b/test/hilbert.go
@@ -47,7 +47,7 @@
 
 func NewMatrix(n, m int) *Matrix {
 	assert(0 <= n && 0 <= m);
-	a := new(Matrix);
+	a := new(*Matrix);
 	a.n = n;
 	a.m = m;
 	a.a = new([]*Big.Rational, n*m);
diff --git a/test/initcomma.go b/test/initcomma.go
index d4bff2a..d86ddbac 100644
--- a/test/initcomma.go
+++ b/test/initcomma.go
@@ -7,7 +7,7 @@
 package main
 
 var a = []int { 1, 2, }
-var b = [5]int { }
+var b = []int { }
 var c = []int { 1 }
 
 func main() {
diff --git a/test/interface1.go b/test/interface1.go
index 649a955..a053ed3 100644
--- a/test/interface1.go
+++ b/test/interface1.go
@@ -28,8 +28,8 @@
 }
 
 func main() {
-	re := new(Regexp);
+	re := new(*Regexp);
 	print("call addinst\n");
-	var x Inst = AddInst(new(Start));	// ERROR "illegal|incompatible"
+	var x Inst = AddInst(new(*Start));	// ERROR "illegal|incompatible"
 	print("return from  addinst\n");
 }
diff --git a/test/ken/array.go b/test/ken/array.go
index 167830e..2027a31 100644
--- a/test/ken/array.go
+++ b/test/ken/array.go
@@ -95,7 +95,7 @@
 func
 testpdpf1()
 {
-	a := new([40]int);
+	a := new(*[40]int);
 	setpd(a);
 	res(sumpd(a), 0, 40);
 
diff --git a/test/ken/chan.go b/test/ken/chan.go
index 6475853..da08477 100644
--- a/test/ken/chan.go
+++ b/test/ken/chan.go
@@ -22,7 +22,7 @@
 type	Chan
 struct
 {
-	sc,rc	*chan int;	// send and recv chan
+	sc,rc	chan int;	// send and recv chan
 	sv,rv	int;		// send and recv seq
 }
 
@@ -38,7 +38,7 @@
 func
 init()
 {
-	nc = new(Chan);
+	nc = new(*Chan);
 }
 
 func
@@ -47,7 +47,7 @@
 	ca := new([]*Chan, n);
 	for i:=0; i<n; i++ {
 		cval = cval+100;
-		ch := new(Chan);
+		ch := new(*Chan);
 		ch.sc = new(chan int, c);
 		ch.rc = ch.sc;
 		ch.sv = cval;
diff --git a/test/ken/embed.go b/test/ken/embed.go
index f0c9f4e..42e83e4 100644
--- a/test/ken/embed.go
+++ b/test/ken/embed.go
@@ -166,10 +166,10 @@
 	var s *S;
 
 	// allocate
-	s = new(S);
-	s.Subp = new(Subp);
-	s.Sub.SubSubp = new(SubSubp);
-	s.Subp.SubpSubp = new(SubpSubp);
+	s = new(*S);
+	s.Subp = new(*Subp);
+	s.Sub.SubSubp = new(*SubSubp);
+	s.Subp.SubpSubp = new(*SubpSubp);
 
 	// explicit assignment
 	s.a = 1;
diff --git a/test/ken/interfun.go b/test/ken/interfun.go
index 97db893..4ab2b8b 100644
--- a/test/ken/interfun.go
+++ b/test/ken/interfun.go
@@ -40,7 +40,7 @@
 	var i2 I2;
 	var g *S;
 
-	s := new(S);
+	s := new(*S);
 	s.a = 5;
 	s.b = 6;
 
diff --git a/test/ken/intervar.go b/test/ken/intervar.go
index 1c3d650..711568b 100644
--- a/test/ken/intervar.go
+++ b/test/ken/intervar.go
@@ -58,9 +58,9 @@
 func
 main()
 {
-	p := new(Print);
-	b := new(Bio);
-	f := new(File);
+	p := new(*Print);
+	b := new(*Bio);
+	f := new(*File);
 
 	p.whoami = 1;
 	p.put = b;
diff --git a/test/ken/ptrfun.go b/test/ken/ptrfun.go
index e7db3a9..949cb82 100644
--- a/test/ken/ptrfun.go
+++ b/test/ken/ptrfun.go
@@ -27,7 +27,7 @@
 	var v int;
 	var c *C;
 
-	c = new(C);
+	c = new(*C);
 	c.a = 6;
 	c.x = &g;
 
diff --git a/test/ken/range.go b/test/ken/range.go
index 2831806..5bb6d55 100644
--- a/test/ken/range.go
+++ b/test/ken/range.go
@@ -10,7 +10,7 @@
 
 var	a	[size]byte;
 var	p	[]byte;
-var	m	*map[int]byte;
+var	m	map[int]byte;
 
 func
 f(k int) byte
diff --git a/test/ken/rob1.go b/test/ken/rob1.go
index a75878b..35397b3 100644
--- a/test/ken/rob1.go
+++ b/test/ken/rob1.go
@@ -31,7 +31,7 @@
 func (list *List)
 Insert(i Item)
 {
-	item := new(ListItem);
+	item := new(*ListItem);
 	item.item = i;
 	item.next = list.head;
 	list.head = item;
@@ -69,10 +69,10 @@
 func
 main()
 {
-	list := new(List);
+	list := new(*List);
 	list.Init();
 	for i := 0; i < 10; i = i + 1 {
-		integer := new(Integer);
+		integer := new(*Integer);
 		integer.Init(i);
 		list.Insert(integer);
 	}
diff --git a/test/ken/rob2.go b/test/ken/rob2.go
index 7d2eecb..9cb2ff3 100644
--- a/test/ken/rob2.go
+++ b/test/ken/rob2.go
@@ -213,7 +213,7 @@
 {
 	var slist, retval *Slist;
 
-	slist = new(Slist);
+	slist = new(*Slist);
 	slist.list.car = nil;
 	slist.list.cdr = nil;
 	slist.isatom = false;
@@ -225,7 +225,7 @@
 		if token == ')' || token == EOF {	// empty cdr
 			break;
 		}
-		slist.list.cdr = new(Slist);
+		slist.list.cdr = new(*Slist);
 		slist = slist.list.cdr;
 	}
 	return retval;
@@ -236,7 +236,7 @@
 	var h, length int;
 	var slist, tail *Slist;
 
-	slist = new(Slist);
+	slist = new(*Slist);
 	if token == '0' {
 		slist.atom.integer = i;
 		slist.isstring = false;
diff --git a/test/ken/robfunc.go b/test/ken/robfunc.go
index 12b4b6d7..947016f 100644
--- a/test/ken/robfunc.go
+++ b/test/ken/robfunc.go
@@ -86,7 +86,7 @@
 	r9, s9 = f9(1);
 	assertequal(r9, 9, "r9");
 	assertequal(int(s9), 9, "s9");
-	var t *T = new(T);
+	var t *T = new(*T);
 	t.x = 1;
 	t.y = 2;
 	r10 := t.m10(1, 3.0);
diff --git a/test/ken/simparray.go b/test/ken/simparray.go
index 90331e5..f68ff14 100644
--- a/test/ken/simparray.go
+++ b/test/ken/simparray.go
@@ -35,7 +35,7 @@
 
 	if s2 != 35 { panic(s2); }
 
-	b := new([100]int);
+	b := new(*[100]int);
 	for i:=0; i<100; i=i+1 {
 		b[i] = i;
 	}
diff --git a/test/ken/simpbool.go b/test/ken/simpbool.go
index aad111d..28ddafe 100644
--- a/test/ken/simpbool.go
+++ b/test/ken/simpbool.go
@@ -30,7 +30,7 @@
 	if !!!a { panic(6); }
 
 	var x *s;
-	x = new(s);
+	x = new(*s);
 	x.a = true;
 	x.b = false;
 
diff --git a/test/ken/string.go b/test/ken/string.go
index 3a15bee..7e3aa90 100644
--- a/test/ken/string.go
+++ b/test/ken/string.go
@@ -92,7 +92,7 @@
 	}
 
 	/* create string with byte array pointer */
-	z2 := new([3]byte);
+	z2 := new(*[3]byte);
 	z2[0] = 'a';
 	z2[1] = 'b';
 	z2[2] = 'c';
diff --git a/test/map.go b/test/map.go
index a0175fe..7182aa0 100644
--- a/test/map.go
+++ b/test/map.go
@@ -46,8 +46,8 @@
 	//mit := new(map[int] T);	// should be able to do a value but:  fatal error: algtype: cant find type <T>{}
 	//mti := new(map[T] int);	// should be able to do a value but:  fatal error: algtype: cant find type <T>{}
 
-	type M map[int] int; 
-	mipM := new(map[int] *M);
+	type M map[int] int;
+	mipM := new(map[int] M);
 
 	const count = 100; // BUG: should be bigger but maps do linear lookup
 	var apT [2*count]*T;
@@ -55,14 +55,14 @@
 	for i := 0; i < count; i++ {
 		s := F.d(i).str();
 		f := float(i);
-		apT[i] = new(T);
+		apT[i] = new(*T);
 		apT[i].s = s;
 		apT[i].f = f;
-		apT[2*i] = new(T);	// need twice as many entries as we use, for the nonexistence check
+		apT[2*i] = new(*T);	// need twice as many entries as we use, for the nonexistence check
 		apT[2*i].s = s;
 		apT[2*i].f = f;
 		// BUG t := T(s, f);
-		t := new(T); t.s = s; t.f = f;
+		t := new(*T); t.s = s; t.f = f;
 		// BUG m := M(i, i+1);
 		m := new(M); m[i] = i+1;
 		mib[i] = (i != 0);
@@ -73,7 +73,7 @@
 		msi[F.d(i).str()] = i;
 		mss[F.d(i).str()] = F.d(10*i).str();
 		mss[F.d(i).str()] = F.d(10*i).str();
-		as := new([arraylen]string);
+		as := new([]string, arraylen);
 			as[0] = F.d(10*i).str();
 			as[1] = F.d(10*i).str();
 		mspa[F.d(i).str()] = as;
@@ -120,7 +120,7 @@
 	if len(mipM) != count {
 		F.s("len(mipM) = ").d(len(mipM)).putnl();
 	}
-	
+
 	// test construction directly
 	for i := 0; i < count; i++ {
 		s := F.d(i).str();
@@ -411,7 +411,7 @@
 			}
 		}
 	}
-	
+
 
 	// tests for structured map element updates
 	for i := 0; i < count; i++ {
diff --git a/test/nil.go b/test/nil.go
index f26ba32..8cd8e57 100644
--- a/test/nil.go
+++ b/test/nil.go
@@ -17,8 +17,8 @@
 	var i *int;
 	var f *float;
 	var s *string;
-	var m *map[float] *int;
-	var c *chan int;
+	var m map[float] *int;
+	var c chan int;
 	var t *T;
 	var in IN;
 	var ta []IN;
@@ -30,6 +30,6 @@
 	c = nil;
 	t = nil;
 	i = nil;
-	ta = new([1]IN);
+	ta = new([]IN, 1);
 	ta[0] = nil;
 }
diff --git a/test/peano.go b/test/peano.go
index 4c1b837..e290905 100644
--- a/test/peano.go
+++ b/test/peano.go
@@ -25,7 +25,7 @@
 
 
 func add1(x *Number) *Number {
-	e := new(Number);
+	e := new(*Number);
 	e.next = x;
 	return e;
 }
@@ -122,7 +122,7 @@
 
 
 func main() {
-	
+
 	verify();
 	for i := 0; i <= 10; i++ {
 		print(i, "! = ", count(fact(gen(i))), "\n");
diff --git a/test/sieve.go b/test/sieve.go
index 366d5b9..91fa6e5 100644
--- a/test/sieve.go
+++ b/test/sieve.go
@@ -7,7 +7,7 @@
 package main
 
 // Send the sequence 2, 3, 4, ... to channel 'ch'.
-func Generate(ch *chan<- int) {
+func Generate(ch chan<- int) {
 	for i := 2; ; i++ {
 		ch <- i  // Send 'i' to channel 'ch'.
 	}
@@ -15,7 +15,7 @@
 
 // Copy the values from channel 'in' to channel 'out',
 // removing those divisible by 'prime'.
-func Filter(in *<-chan int, out *chan<- int, prime int) {
+func Filter(in <-chan int, out chan<- int, prime int) {
 	for {
 		i := <-in;  // Receive value of new variable 'i' from 'in'.
 		if i % prime != 0 {
diff --git a/test/test0.go b/test/test0.go
index a3691fb..0a11e1d 100644
--- a/test/test0.go
+++ b/test/test0.go
@@ -8,7 +8,7 @@
 
 const
   a_const = 0
-  
+
 const (
   pi = /* the usual */ 3.14159265358979323;
   e = 2.718281828;
@@ -55,7 +55,7 @@
 }
 
 func control_structs() {
-  var p *Point = new(Point).Initialize(2, 3);
+  var p *Point = new(*Point).Initialize(2, 3);
   i := p.Distance();
   var f float = 0.3;
   for {}
diff --git a/test/utf.go b/test/utf.go
index 5905152..7880b5a 100644
--- a/test/utf.go
+++ b/test/utf.go
@@ -29,7 +29,7 @@
 	// encoded as bytes:  'a' 'b' 'c' e6 97 a5 e6 9c ac e8 aa 9e
 	const L = 12;
 	if L != l { panic("wrong length constructing array") }
-	a := new([L]byte);
+	a := new(*[L]byte);
 	a[0] = 'a';
 	a[1] = 'b';
 	a[2] = 'c';
diff --git a/test/vectors.go b/test/vectors.go
index eefec91..abc5973 100644
--- a/test/vectors.go
+++ b/test/vectors.go
@@ -31,7 +31,7 @@
 func test1() {
 	var a [1000] *S;
 	for i := 0; i < len(a); i++ {
-		a[i] = new(S).Init(i);
+		a[i] = new(*S).Init(i);
 	}
 
 	v := array.New(0);
@@ -48,7 +48,7 @@
 			panic("expected ", i, ", found ", x.val, "\n");
 		}
 	}
-	
+
 	for v.Len() > 10 {
 		v.Remove(10);
 	}