Skip to content

Commit 285b602

Browse files
committed
missing files; cleaned up g4 nothave output.
fixes 386 build. R=r DELTA=56 (56 added, 0 deleted, 0 changed) OCL=34979 CL=34981
1 parent 89a881d commit 285b602

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

src/cmd/8l/elf.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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"

src/pkg/runtime/nacl/defs.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
};

test/compos.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
}

0 commit comments

Comments
 (0)