Landing: 1cfd37290199

Project / Subsystem

gcc / gcc

Date

2026-04-17

Author

Jan Hubicka

Commit

1cfd37290199bd69706d5a74d4cee40bd83d671c

Source

github

Impact

5/10

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
commit_hash
1cfd37290199bd69706d5a74d4cee40bd83d671c
source_type
github
headline
Fix lto-devirt-23.C testcase failure.
tldr
The compiler was incorrectly assuming that destructors can't be in construction, leading to a test failure fixed by removing an ineffective check.
why_it_matters
This bug could lead to incorrect code generation in LTO, especially when dealing with polymorphic types and virtual functions.
author
Jan Hubicka
impact_score
5
impact_rationale
Fixes a testcase failure related to LTO and devirtualization.
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • lto
  • ipa
  • devirtualization
  • bugfix
discussion_id_link
bugzilla_pr
date
2026-04-17T00:00:00.000Z

The testcase lto-devirt-23.C was failing because the compiler was missing the fact that a type can be in construction. The polymorphic_ctor_dtor_p function was returning false on polymorphic destructors because they have a PURE flag. The check was deemed ineffective and has been removed to resolve the failure.