------- Comment #9 from asl at math dot spbu dot ru  2007-10-17 16:45 -------
(In reply to comment #3)
> Two decls are generated for function x, the first one (inside MAIN__) doesn't
> have a proper argument list while the second one is OK. When I try to make
> gfortran emit only one decl per externally-visible function, it's currently
> choking on this.
After some thinking on this example, it seems, I found some solution. My
previous approach cannot be completed because of the presence of optional
arguments. And even having some valid call, we cannot construct valid decl from
this (or we will need some additional logic, which will "complete" such decls).

The idea itself is pretty simple: why don't turn external functions/intrinsics
into varargs function (in C/C++ sense). In this case trees won't became bogus
anymore, however, having call to varargs function can (in theory) disable some
optimization performed on it. Attached patch works fine for me. Any comments?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33097

Reply via email to