<pre class="notranslate">What steps will reproduce the problem?
Run this program:

package main

import (
    "fmt"
    "os"
    "text/template"
)

type Foo struct {
}

func (foo Foo) Greeting() string {
    return "Hello"
}

type Bar struct {
    Foo
}

func main() {
    t := template.Must(template.New("").Parse("{{.Greeting}}\n{{.Foo.Greeting}}\n"))

    var bar Bar
    var unnamed struct{
        Foo
    }
    
    if err := t.Execute(os.Stdout, bar); err != nil {
        fmt.Println(err)
    }
    fmt.Println("===========")
    fmt.Println(bar.Greeting())
    fmt.Println(unnamed.Greeting())
    fmt.Println("===========")
    if err := t.Execute(os.Stdout, unnamed); err != nil {
        fmt.Println(err)
    }
}

What is the expected output?

Hello
Hello
===========
Hello
Hello
===========
Hello
Hello

What do you see instead?

Hello
Hello
===========
Hello
Hello
===========
template: :1: can't evaluate field Greeting in type struct { main.Foo }

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Linux

Which revision are you using?  (hg identify)
96bd78e7d35e weekly/weekly.2012-02-22

Please provide any additional information below.</pre>
<pre class="notranslate">What does 'go version' print?
go version devel +ff82d3107ab3 Sun Aug 31 22:49:14 2014 -0400 windows/amd64

What steps reproduce the problem?

Create a program that uses math.h / pow function in two separate packages. Try to link
them together into one main program:

1. bug/bug.go: <a href="http://play.golang.org/p/nFkVRN6qN-" rel="nofollow">http://play.golang.org/p/nFkVRN6qN-</a>
2. bug/one/one.go: <a href="http://play.golang.org/p/4e68AXsW1r" rel="nofollow">http://play.golang.org/p/4e68AXsW1r</a>
3. bug/two/two.go: <a href="http://play.golang.org/p/f3pNq-xniD" rel="nofollow">http://play.golang.org/p/f3pNq-xniD</a>
4. go install bug

What happened?
# bug
C:\Users\stephen\Desktop\godev\pkg\windows_amd64/bug/two.a(_all.o): duplicate symbol
reference: pow in both bug/one(.text) and bug/two(.text)

What should have happened instead?
The package should link properly.

Please provide any additional information below.

This is a simplified example of a bug I ran into recently. I have an application that
imports a CGO wrapper to the Chipmunk 2D physics engine and a CGO wrapper to GLFW. The
program links fine on Linux -- but I cannot build it on windows due to this issue.

FWIW I am using (TDM) MinGW-W64 4.8.1 rev2</pre>