[LLVMdev] [DragonEgg] Why Fortran's "call flush()" is converted to "call void bitcast (void (...)* @_gfortran_flush_i4 to void (i8*)*)(i8* null) nounwind" ?

Anton Korobeynikov anton at korobeynikov.info
Tue Jul 17 06:35:23 PDT 2012


> actually there is a different fix, which is to not pay any attention to GCC
> function types when generating calls (and function prototypes), and instead
> do everything by querying GCC's CUMULATIVE_ARGS.
I tried to do this during llvm-gcc times and it turned out that there
might be different calls with different signatures in single module
e.g. function with N arguments is called in some cases with N - 1
first args and since the remaining one is unused everything is fine.
So, basically the function *is* varargs but it's not possible to
deduce this from the args...

I don't recall all the details now though...

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-dev mailing list