Commit 574826b
committed
[h2root] Fix declaration and usage of
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`.
However, 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. 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.htmlhropen
1 parent b92c0fa commit 574826b
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
| 174 | + | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
| 322 | + | |
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
| |||
0 commit comments