Skip to content

cmd/compile: incorrect loop trip count [1.25 backport] #78374

Closed

Description

@gopherbot

@Jorropo requested issue #78303 to be considered for backport to the next 1.25 minor release.

@gopherbot please open backport issues for 1.25 and 1.26

This is a misscompilation that yields different runtime behavior than the go spec requires.

Activity

  1. added
    CherryPickCandidateUsed during the release process for point releases
    compiler/runtimeIssues related to the Go compiler and/or runtime.
    on Mar 26, 2026
  2. added this to the Go1.25.9 milestone on Mar 26, 2026
  3. gopherbot commented on Mar 27, 2026

    @gopherbot
    ContributorAuthor

    Change https://go.dev/cl/760061 mentions this issue: cmd/compile: do not invert loops that would overflow or underflow

  4. gopherbot commented on Mar 27, 2026

    @gopherbot
    ContributorAuthor

    Change https://go.dev/cl/760060 mentions this issue: cmd/compile: cleanup downward counting loop code

  5. modified the milestones: Go1.25.9, Go1.25.10 on Apr 7, 2026
  6. gopherbot commented on Apr 14, 2026

    @gopherbot
    ContributorAuthor

    Change https://go.dev/cl/766981 mentions this issue: [release-branch.go1.25] fix incorrect loop trip counts

  7. added a commit that references this issue on Apr 23, 2026
    f093575
  8. gopherbot commented on Apr 23, 2026

    @gopherbot
    ContributorAuthor

    Closed by merging CL 766981 (commit f093575) to release-branch.go1.25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CherryPickApprovedUsed during the release process for point releasescompiler/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