Skip to content

[6.32] Backport fix of argument-passing conventions for hbook#22573

Open
hageboeck wants to merge 2 commits into
root-project:v6-32-00-patchesfrom
hageboeck:hbook_6.32
Open

[6.32] Backport fix of argument-passing conventions for hbook#22573
hageboeck wants to merge 2 commits into
root-project:v6-32-00-patchesfrom
hageboeck:hbook_6.32

Conversation

@hageboeck

Copy link
Copy Markdown
Member

Since gcc 8, the fortran side expects string lengths to be passed as size_t instead of int.

When variable-length strings are passed into functions compiled by
gfortran, the lengths of the strings have to be passed at the end of the
argument list as size_t. When using gcc <= 7 or clang (where the
__GNUC__ macro might return unpredictable values), we were putting int on
the C side, which got interpreted as size_t on the fortran side.

(cherry picked from commit 3a9316e)
When variable-length strings are passed into functions compiled by
gfortran, the lengths of the strings have to be passed at the end of the
argument list as size_t. When using gcc <= 7 or clang (where the
__GNUC__ macro might return unpredictable values), we were putting int on
the C side, which got interpreted as size_t on the fortran side.

(cherry picked from commit 19fdba0)
@hageboeck hageboeck self-assigned this Jun 11, 2026
@hageboeck hageboeck requested review from lmoneta and pcanal as code owners June 11, 2026 08:46
@hageboeck hageboeck changed the title Backport fix of argument-passing conventions for hbook [6.32] Backport fix of argument-passing conventions for hbook Jun 11, 2026
@github-actions

Copy link
Copy Markdown

Test Results

     6 files       6 suites   20h 24m 9s ⏱️
 2 563 tests  2 563 ✅ 0 💤 0 ❌
14 963 runs  14 963 ✅ 0 💤 0 ❌

Results for commit ed8a5dd.

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.

1 participant