Skip to content

6g crashes with seg fault #615

@gopherbot

Description

@gopherbot

by marius@vastech.co.za:

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.

Checked

What steps will reproduce the problem?

Compile the program below (called tstMake.go on my machine) with:

6g  tstMake.go

It produces the output: "Segmentation fault"

>>>>>>>>>>>>>>>>

package main

type T struct {
}

func main() {
/*  Compiles without problem:*/
/*  t := T{}
    slots := make([]int, a(&t))*/
    
/*  6g crashes with seg fault*/
    slots := make([]int, a(&T{}))
    
    slots[0] = 1
}

func a(t *T) int {
    return 0
}

<<<<<<<<<<<<

What is your $GOOS?  $GOARCH?

GOARCH=amd64
GOOS=darwin


Which revision are you using?  (hg identify)

0df5f8df3a21 tip

Please provide any additional information below.

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