Skip to content

cmd/compile go:noinline misuse in TestAssembly #22208

Closed
@huguesb

Description

@huguesb

A pragma is placed before a closure and does not appear in the AST (at least not in the corresponding ODCLFUNC node)

func f72(a, b int) int {
  //go:noinline
  func() {_, _ = a, b} () // use some frame
  return b
}

This test currently passes because calls to closures are never inlined but this will change soon.
See #15561 and https://go-review.googlesource.com/c/go/+/65071

Should go:noinline be supported for closures? If so the scanner needs to be fixed. Otherwise the test needs to be updated.

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