Landing: 8f1698229d33

Project / Subsystem

gcc / analyzer

Date

2026-07-05

Author

Egas Ribeiro

Commit

8f1698229d33a74cda7ec9f02575172df10b2774

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
analyzer
patch_id
commit_hash
8f1698229d33a74cda7ec9f02575172df10b2774
source_type
github
headline
Analyzer gains support for virtual function devirtualization.
tldr
The GCC analyzer can now devirtualize virtual function calls, improving analysis accuracy.
author
Egas Ribeiro
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • analyzer
  • static analysis
  • virtual functions
  • C++
discussion_id_link
bugzilla_pr
date
2026-07-05T00:00:00.000Z

The GCC static analyzer has gained the ability to devirtualize virtual function calls, addressing a significant limitation. This patch introduces logic to resolve calls made through OBJ_TYPE_REF by utilizing vptr information to link calls to concrete subclass implementations. Additionally, can_throw_p has been enhanced to consider thunks and TREE_NOTHROW for more accurate exception analysis, particularly in multiple inheritance scenarios.