Skip to content

fix(test): avoid GCC 13.3 ICE in floating-point comparator - #530

Merged
SteNicholas merged 1 commit into
apache:mainfrom
lucasfang:fix-gcc13-fields-comparator-ice
Nov 6, 2026
Merged

SteNicholas merged 1 commit into
apache:mainfrom
lucasfang:fix-gcc13-fields-comparator-ice

Conversation

@lucasfang

Copy link
Copy Markdown
Collaborator

Purpose

Closes #529.

The default Debug build crashes GCC 13.3 while instantiating FieldsComparatorTest::CheckFloatingPointOrder<float>: the negated local constant is passed directly into the variant-backed row generator. Materialize the negated NaN as T before that conversion to avoid the compiler ICE.

The existing float/double ordering assertions continue to cover infinities, signed zero, NaNs, and sign-flipped NaN equality. A scan of 2,195 repository-owned C++ files and review of the other negated floating/template-constant candidates found no additional confirmed instance of this conversion pattern.

Tests

  • Reproduced the original GCC 13.3 ICE in the project translation unit and a standalone standard-library example.
  • Full default-feature Debug builds completed with GCC 13.3.0 and Clang 18.1.3; final incremental checks used cmake --build build --parallel 96 and cmake --build build-clang --parallel 96.
  • build/debug/paimon-common-test --gtest_filter='FieldsComparatorTest.*': 6/6 passed with GCC 13.3.0.
  • build-clang/debug/paimon-common-test --gtest_filter='FieldsComparatorTest.*': 6/6 passed with Clang 18.1.3.
  • ctest --test-dir build -L unittest --output-on-failure --parallel 96: 32/32 test executables passed, 201.32 seconds.
  • All configured pre-commit hooks passed with pre-commit run --all-files --show-diff-on-failure in an isolated validation checkout at the same base commit plus this patch.
  • git diff --check passed.

API and Format

Unchanged: this only adjusts one test initialization.

Documentation

No user-facing documentation changes are needed for this test-only compiler workaround.

Generative AI tooling

Generated-by: OpenAI Codex 26.1029.70936

@SteNicholas SteNicholas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@SteNicholas
SteNicholas merged commit df6f7c0 into apache:main Nov 6, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] GCC 13.3 ICE when building FieldsComparatorTest

2 participants