Skip to content

[v636] Adapt to GCC 8 passing convention for string length#21022

Merged
guitargeek merged 3 commits intoroot-project:v6-36-00-patchesfrom
guitargeek:h2root_636
Jan 25, 2026
Merged

[v636] Adapt to GCC 8 passing convention for string length#21022
guitargeek merged 3 commits intoroot-project:v6-36-00-patchesfrom
guitargeek:h2root_636

Conversation

@guitargeek
Copy link
Contributor

guitargeek and others added 3 commits January 25, 2026 20:49
According to the `gfortran` argument passing conventions, for any
Fortran procedure, the compiler will automatically define a C prototype.
This is what we use in `h2root`.

Note that for procedures like `HROPEN` that takes string arguments, the
signature of the C prototype will have extra arguments for the string
lengths, which we also have to include in our forward declaration and
usage. However, the type of these was changed with GCC 8 to size_t, so
we have to also account for that as recommended in [1]. Otherwise, we
get undefined behavor, which causes the `h2root` test to fail on ARM64
with GCC 14.

[1] https://gcc.gnu.org/onlinedocs/gfortran/Argument-passing-conventions.html

(cherry picked from commit aafddfb)
(cherry picked from commit 596cfee)
Follow-up of root-project#20535

(cherry picked from commit 4ac2999)
(cherry picked from commit d2a8c79)
Follow-up of root-project@aafddfb

(cherry picked from commit 34af31c)
(cherry picked from commit 8e90e92)
@github-actions
Copy link

Test Results

    18 files      18 suites   2d 21h 10m 36s ⏱️
 2 753 tests  2 751 ✅ 0 💤 2 ❌
47 867 runs  47 864 ✅ 0 💤 3 ❌

For more details on these failures, see this check.

Results for commit e21329e.

@guitargeek guitargeek merged commit a21773b into root-project:v6-36-00-patches Jan 25, 2026
17 of 22 checks passed
@guitargeek guitargeek deleted the h2root_636 branch January 25, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants