1 // Copyright 2014 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 5242. Cgo incorrectly computed the alignment of structs
6 // with no Go accessible fields as 0, and then panicked on
7 // modulo-by-zero computations.
19 int issue5242(foo f, bar b) {
27 func test5242(t *testing.T) {
28 if got := C.issue5242(C.foo{}, C.bar{}); got != 5242 {
29 t.Errorf("got %v", got)