Skip to content

cmd/compile: sign extension wrong for paired 32-bit loads on arm64 #71759

@randall77

Description

@randall77
package main

//go:noinline                                                                                                                                                                            
func f(p *[2]int32) (int64, int64) {
        return int64(p[0]), int64(p[1])
}

func main() {
	p := [2]int32{-1, -1}
	x, y :=	f(&p)
	println(x, y)
}

Should print -1 -1. At tip it produces 4294967295 4294967295.

This is a bug in the recent CL 629256.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.SoonThis needs action soon. (recent regressions, service outages, unusual time-sensitive situations)arch-arm64compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions