https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118831
--- Comment #10 from jcldc13 at gmail dot com --- (In reply to Jakub Jelinek from comment #6) > Note, it is wrong even on x86_64. For varargs functions, %rax needs to be > number of floating point arguments in the ABI, but if called through K&R or > Fortran unspecified arguments function type, nothing fills in %rax, so it > will be some random value.(In reply to Jakub Jelinek from comment #6) > Note, it is wrong even on x86_64. For varargs functions, %rax needs to be > number of floating point arguments in the ABI, but if called through K&R or > Fortran unspecified arguments function type, nothing fills in %rax, so it > will be some random value. You can run by yourself my test case on x86 computer, and you'll always get, pretty sure, "hello world" stored in "myval" variable. No random value, except from aarch64 computer (at least from a Mac ARM) In my long time project, I even call C function with variable arguments from fortran with many variables, mixing big floating arrays, integer arrays, etc... Here is a snippet of my real code : - fortran part : i=io_nemo_f(infile,80,MAXBODY, $ "real8,3n,read,n,m,x,v,t,k,info,p,st,sp,acc\0", $ nbody,mass,pos,vel,ts,keys,pot,st,sp,acc) - C part : int io_nemo_f_(char * iofile, int * lg, int * size_array, char * param, ...) { va_list pa; ... ... } And in the compilation/installation process of my library, I have also pure C code which compare the results with the mixed Fortran/C library. No errors on x86_64 arch, never, except on ARM architecture. Well, you are all gcc experts, and I am just a programmer. But how to explain I have never got an issue on x86 if you say that I should get random values ... ? I am desperate because it has always worked and still works on x86-64 and not on aarch64, and you are telling me that I am wrong since the beginning, it can't be a coincidence.