File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed
Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2009 The Go Authors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style
3+ // license that can be found in the LICENSE file.
4+
5+ #include "l.h"
6+ #include "../ld/elf.c"
Original file line number Diff line number Diff line change 1+ // Copyright 2009 The Go Authors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style
3+ // license that can be found in the LICENSE file.
4+
5+ /*
6+ Input to godefs.
7+
8+ godefs -f-m32 -f-I/home/rsc/pub/nacl/native_client/src/third_party/nacl_sdk/linux/sdk/nacl-sdk/nacl/include -f-I/home/rsc/pub/nacl/native_client defs.c >386/defs.h
9+ */
10+
11+ #define __native_client__ 1
12+
13+ #define suseconds_t nacl_suseconds_t_1
14+ #include <sys/types.h>
15+ #undef suseconds_t
16+
17+ #include <sys/mman.h>
18+
19+ enum {
20+ $PROT_NONE = PROT_NONE ,
21+ $PROT_READ = PROT_READ ,
22+ $PROT_WRITE = PROT_WRITE ,
23+ $PROT_EXEC = PROT_EXEC ,
24+
25+ $MAP_ANON = MAP_ANONYMOUS ,
26+ $MAP_PRIVATE = MAP_PRIVATE ,
27+ };
Original file line number Diff line number Diff line change 1+ // $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: compos
2+
3+ // Copyright 2009 The Go Authors. All rights reserved.
4+ // Use of this source code is governed by a BSD-style
5+ // license that can be found in the LICENSE file.
6+
7+ package main
8+
9+ type T struct {
10+ int ;
11+ }
12+
13+ func f () * T {
14+ return & T {1 }
15+ }
16+
17+ func main () {
18+ x := f ();
19+ y := f ();
20+ if x == y {
21+ panic ("not allocating & composite literals" );
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments