* tree-vect-loop-manip.c (vect_do_peeling): Do not use
[official-gcc.git] / libgo / misc / cgo / test / issue4417.go
blob9b182870d8e16a9118d71bd6ec49263e6f752fd2
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.
7 //
9 package cgotest
12 #include <stdbool.h>
14 static int c_bool(bool a, bool b, int c, bool d, bool e) {
15 return c;
18 import "C"
19 import "testing"
21 func testBoolAlign(t *testing.T) {
22 b := C.c_bool(true, true, 10, true, false)
23 if b != 10 {
24 t.Fatalf("found %d expected 10\n", b)
26 b = C.c_bool(true, true, 5, true, true)
27 if b != 5 {
28 t.Fatalf("found %d expected 5\n", b)
30 b = C.c_bool(true, true, 3, true, false)
31 if b != 3 {
32 t.Fatalf("found %d expected 3\n", b)
34 b = C.c_bool(false, false, 1, true, false)
35 if b != 1 {
36 t.Fatalf("found %d expected 1\n", b)
38 b = C.c_bool(false, true, 200, true, false)
39 if b != 200 {
40 t.Fatalf("found %d expected 200\n", b)