Skip to content

[Helper] Avoid GCC LTO internal compiler error in makeFixedSizeTypeName - #6449

Merged
th-skam merged 1 commit into
sofa-framework:masterfrom
fredroy:fix_gcc_lto_ice_typename
Nov 10, 2026
Merged

th-skam merged 1 commit into
sofa-framework:masterfrom
fredroy:fix_gcc_lto_ice_typename

Conversation

@fredroy

@fredroy fredroy commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Fix internal compiler error with GCC<13.4 with LTO enabled

Indexing the array with std::string_view::size_type expressions 
in the constant initializer of the VecTypes/RigidTypes type  names makes GCC crash 
when a file calling Name() at runtime is compiled with LTO (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114501). 
Keep the sizes as std::size_t instead.

[with-all-tests]


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

Indexing the array with std::string_view::size_type expressions in the
constant initializer of the VecTypes/RigidTypes type names makes GCC crash
when a file calling Name() at runtime is compiled with LTO
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114501).
Keep the sizes as std::size_t instead.
@fredroy fredroy added pr: fix Fix a bug pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: status to review To notify reviewers to review this pull-request pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI labels Nov 9, 2026
@th-skam
th-skam merged commit 014b3eb into sofa-framework:master Nov 10, 2026
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants