Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler bails out on unsafe.Offsetof() #843

Closed
gopherbot opened this issue Jun 6, 2010 · 3 comments
Closed

compiler bails out on unsafe.Offsetof() #843

gopherbot opened this issue Jun 6, 2010 · 3 comments

Comments

@gopherbot
Copy link

by czapkofan:

1. What is a short input program that triggers the error?

package main

import (
    "fmt"
    "unsafe"
)

type example struct {
    port   uint16
}

func main() {
    foo := new(example)
    fmt.Println("offset=", unsafe.Offsetof(foo.port))
}


2. What is the full compiler output?

<epoch>: internal compiler error: dowidth any

3. What version of the compiler are you using?  (Run it with the -V flag.)

8g version 5612+

4. Notes:
- Go changeset: 443fb42ed60e
- Go compiled on Windows
@peterGo
Copy link
Contributor

peterGo commented Jun 7, 2010

Comment 1:

Error also occurs with Ubuntu 9.10 where GOOS=linux and GOARCH=amd64.

@griesemer
Copy link
Contributor

Comment 2:

Labels changed: added compilerbug.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Jul 15, 2010

Comment 4:

This issue was closed by revision cdb446f.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants