Landing: 618ffd9be912

Project / Subsystem

gcc / gcc/testsuite

Date

2026-06-11

Author

Iain Sandoe

Commit

618ffd9be9129adaf2d5d8fcbe934084c2c45fe9

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/testsuite
patch_id
commit_hash
618ffd9be9129adaf2d5d8fcbe934084c2c45fe9
source_type
github
headline
Test suite uses portable weak symbol scanning for Darwin C++ tests.
tldr
GCC's C++ test suite now employs portable `scan-weak` and `scan-not-weak` directives for weak symbol checks, especially on Darwin.
author
Iain Sandoe
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • testsuite
  • c++
  • darwin
  • portability
  • weak-symbols
discussion_id_link
bugzilla_pr
date
2026-06-11T00:00:00.000Z

This commit refactors a C++ test in GCC’s test suite to use the scan-weak and scan-not-weak directives, improving its portability, particularly for Darwin targets. Previously, the test g++.dg/reflect/visibility1.C might have required extensive modifications to function correctly on Darwin due to differences in how weak symbols are handled. By leveraging these portability helpers, the test suite can now reliably verify weak symbol behavior across different operating systems, reducing maintenance overhead and ensuring consistent testing results.