Landing: f1933b5ba13b

Project / Subsystem

gcc / c++

Date

2026-08-22

Author

Jason Merrill

Commit

f1933b5ba13bb2abd1329cfb1ba9501c90f4c516

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
—
commit_hash
f1933b5ba13bb2abd1329cfb1ba9501c90f4c516
source_type
github
headline
c++: Fix modules and typeid interaction for template instantiation.
tldr
c++: Ensures `typeid` works correctly with modules by reusing existing type information.
author
Jason Merrill
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • c++
  • • modules
  • • rtti
discussion_id_link
—
bugzilla_pr
—
date
2026-08-22T00:00:00.000Z

This commit addresses an issue where instantiating a template from a translation unit (TU) that included <typeinfo> in an importing TU that did not, would fail. Instead of complex lookup mechanisms in the other TU, the change reuses the type information already associated with the TYPEID_EXPR. This ensures consistent behavior for typeid when using C++ modules.