* tree-vect-loop-manip.c (vect_do_peeling): Do not use
[official-gcc.git] / libgo / misc / cgo / test / issue5242.go
blobc81cd409199f84cd723e555c36b47d6c6943337e
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.
9 package cgotest
12 typedef struct {
13 } foo;
15 typedef struct {
16 int x : 1;
17 } bar;
19 int issue5242(foo f, bar b) {
20 return 5242;
23 import "C"
25 import "testing"
27 func test5242(t *testing.T) {
28 if got := C.issue5242(C.foo{}, C.bar{}); got != 5242 {
29 t.Errorf("got %v", got)