From 48d5e559013be80e353ea530923ea4afaf9b56c0 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 15 Aug 2013 14:38:32 -0400 Subject: cmd/gc: &x panics if x does See golang.org/s/go12nil. This CL is about getting all the right checks inserted. A followup CL will add an optimization pass to remove redundant checks. R=ken2 CC=golang-dev https://codereview.appspot.com/12970043 --- src/cmd/8g/prog.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/cmd/8g/prog.c') diff --git a/src/cmd/8g/prog.c b/src/cmd/8g/prog.c index 05d69853b..5fded770e 100644 --- a/src/cmd/8g/prog.c +++ b/src/cmd/8g/prog.c @@ -40,6 +40,7 @@ static ProgInfo progtable[ALAST] = { [APCDATA]= {Pseudo}, [AUNDEF]= {OK}, [AUSEFIELD]= {OK}, + [ACHECKNIL]= {LeftRead}, // NOP is an internal no-op that also stands // for USED and SET annotations, not the Intel opcode. -- cgit v1.2.1