Skip to content

Strange segfault during compilation #867

@nsf

Description

@nsf
Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1. Save the attached code to test2.go
2. Try to compile using 8g: 8g test2.go
3. Segfault.

What is the expected output?
An error message.

What do you see instead?
Segfault.


What is your $GOOS?  $GOARCH?
linux, 386


Which revision are you using?  (hg identify)
f776656df34c release.2010-06-09/release

Please provide any additional information below.
I guess it's somehow related to the type switch statement. There is a bug in the code
itself, it should be "*ast.FuncDecl" in case statement instead of
"ast.FuncDecl". But compiler says nothing and just dies with segfault.

Attachments:

  1. test2.go (303 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions