Landing: 0940b305d7bb

Project / Subsystem

gcc / testsuite

Date

2026-05-20

Author

David Malcolm

Commit

0940b305d7bbf11da12815e30480c768e4516b7d

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
testsuite
patch_id
commit_hash
0940b305d7bbf11da12815e30480c768e4516b7d
source_type
github
headline
Add Reduced Test For -fanalyzer On std::string
tldr
A new test case was added to verify the fix for a false positive in the static analyzer related to std::string.
author
David Malcolm
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • testsuite
  • analyzer
  • std::string
discussion_id_link
bugzilla_pr
date
2026-05-20T00:00:00.000Z

This commit adds a new test case to the GCC testsuite to verify that a recently-introduced fix to the static analyzer is working correctly. The test is based on a reduced version of libstdc++ code, focusing on the small string optimization of std::string. The original bug caused the analyzer to report false positives due to confusion between small-string-optimization and heap allocation branches.