Landing: 6242294eb326

Project / Subsystem

gcc / gccrs

Date

2026-06-29

Author

Enes Cevik

Commit

6242294eb326ec926bd0520b8fc01cd778d0a802

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gccrs
patch_id
commit_hash
6242294eb326ec926bd0520b8fc01cd778d0a802
source_type
github
headline
gccrs: backend: Fix incorrect impl block selection
tldr
gccrs backend now correctly identifies the `impl` block for trait dispatch, fixing dynamic dispatch errors for types implementing the same trait.
author
Enes Cevik
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • gccrs
  • rust
  • backend
  • bugfix
discussion_id_link
bugzilla_pr
date
2026-06-29T00:00:00.000Z

A bug in gccrs’s vtable generation has been fixed, which previously caused incorrect method calls during dynamic dispatch. The compiler would select the first impl block that matched a trait predicate, without verifying if it belonged to the correct receiver type. This change ensures that the impl block’s resolved type is compared against the receiver type, guaranteeing that the correct associated function is called.