diff --git a/misc/cgo/test/issue19832.go b/misc/cgo/test/issue19832.go deleted file mode 100644 index 44587770af..0000000000 --- a/misc/cgo/test/issue19832.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Issue 19832. Functions taking a pointer typedef were being expanded and triggering a compiler error. - -package cgotest - -// typedef struct { int i; } *PS; -// void T19832(PS p) {} -import "C" -import "testing" - -func test19832(t *testing.T) { - C.T19832(nil) -} diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go index 4f16fe0e31..2ebe906699 100644 --- a/src/cmd/cgo/gcc.go +++ b/src/cmd/cgo/gcc.go @@ -2250,12 +2250,6 @@ func (c *typeConv) FuncArg(dtype dwarf.Type, pos token.Pos) *Type { break } - // If we already know the typedef for t just use that. - // See issue 19832. - if def := typedef[t.Go.(*ast.Ident).Name]; def != nil { - break - } - t = c.Type(ptr, pos) if t == nil { return nil