1 // Copyright 2012 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.
5 // Issue 4417: cmd/cgo: bool alignment/padding issue.
6 // bool alignment is wrong and causing wrong arguments when calling functions.
14 static int c_bool(bool a, bool b, int c, bool d, bool e) {
21 func testBoolAlign(t *testing.T) {
22 b := C.c_bool(true, true, 10, true, false)
24 t.Fatalf("found %d expected 10\n", b)
26 b = C.c_bool(true, true, 5, true, true)
28 t.Fatalf("found %d expected 5\n", b)
30 b = C.c_bool(true, true, 3, true, false)
32 t.Fatalf("found %d expected 3\n", b)
34 b = C.c_bool(false, false, 1, true, false)
36 t.Fatalf("found %d expected 1\n", b)
38 b = C.c_bool(false, true, 200, true, false)
40 t.Fatalf("found %d expected 200\n", b)