Landing: 822c7840922d

Project / Subsystem

gcc / c++/reflection

Date

2026-05-04

Author

chzn@mail.ustc.edu.cn

Commit

822c7840922d957fede19e6f11d94160772cd454

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++/reflection
patch_id
commit_hash
822c7840922d957fede19e6f11d94160772cd454
source_type
github
headline
C++/Reflection: Fix ICE on is_accessible [PR124241].
tldr
Fixes an internal compiler error (ICE) when using `is_accessible` with anonymous unions by adding a missing check.
author
chzn@mail.ustc.edu.cn
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c++
  • reflection
  • ice
  • bugfix
discussion_id_link
bugzilla_pr
date
2026-05-04T00:00:00.000Z

The compiler was experiencing an internal compiler error (ICE) when the is_accessible feature was used with anonymous unions. This commit fixes the issue by adding a check for the otype (the type being accessed) in the accessible_p function within search.cc. This ensures that the compiler correctly handles access checks for members of anonymous unions.