[Bug fortran/44471] Wrong call with variadic declaration

2019-03-03 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44471

Thomas Koenig  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Thomas Koenig  ---
We now use the backend decl if there is one.  And with PR87689
fixed, we no longer use variadic calls. The xorl is no longer there.

Hence, closing as FIXED.

[Bug fortran/44471] Wrong call with variadic declaration

2011-03-25 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44471

--- Comment #6 from Tobias Burnus burnus at gcc dot gnu.org 2011-03-25 
18:18:22 UTC ---
See also PR 33097 and PR 40976. Try also the program at
http://gcc.gnu.org/ml/fortran/2010-05/msg00330.html to make sure it still
works.


[Bug fortran/44471] Wrong call with variadic declaration

2010-08-17 Thread burnus at gcc dot gnu dot org


--- Comment #4 from burnus at gcc dot gnu dot org  2010-08-17 09:35 ---
Cf. PR 45304 for a partial fix.


-- 


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



[Bug fortran/44471] Wrong call with variadic declaration

2010-08-17 Thread jakub at gcc dot gnu dot org


--- Comment #5 from jakub at gcc dot gnu dot org  2010-08-17 09:51 ---
The #c2 patch is problematic, because build_function_type shares function
types, so setting TYPE_ARG_TYPES on that I'm afraid will affect all functions
with
(...) arguments and the same return type.  So, the arglist needs to be passed
down to gfc_get_function_type or wherever build_function_type is called.
Furthermore, this doesn't help the case of functions that have no arguments
(when we build_function_decl instead gfc_get_extern_function_decl, yet
sym-formal is NULL or gfc_get_extern_function_decl for call noargsfn () ).


-- 


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



[Bug fortran/44471] Wrong call with variadic declaration

2010-06-12 Thread burnus at gcc dot gnu dot org


--- Comment #3 from burnus at gcc dot gnu dot org  2010-06-12 07:12 ---
(In reply to comment #2)
 It is possible to get the front-end to construct a real argument types list
 from the arguments list of the external call, as is done in the patch 
 attached.

I think doing so is the proper way - the question is whether one should already
do it earlier such that in resolve.c one can give a diagnostic for

  external foo
  call foo(3.0)
  call foo(4)  !  error, inconsistent interface
  end

Cf. PR 40976.) In any case, (re)constructing the interface from the call is
sensible.


-- 


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



[Bug fortran/44471] Wrong call with variadic declaration

2010-06-11 Thread fxcoudert at gcc dot gnu dot org


--- Comment #1 from fxcoudert at gcc dot gnu dot org  2010-06-11 21:55 
---
We generate a variadic prototype for the decl when calling bar because we try
to generate it anew, instead of finding the toplevel decl already existing.
This is (again) the multiple decls issue.

(Well, we could also fix this issue by rebuilding a complete new decl that has
the right argument types, but frankly, we might as well fix the multiple decls
issue.)


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-06-11 21:55:30
   date||


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



[Bug fortran/44471] Wrong call with variadic declaration

2010-06-11 Thread fxcoudert at gcc dot gnu dot org


--- Comment #2 from fxcoudert at gcc dot gnu dot org  2010-06-11 22:17 
---
Created an attachment (id=20899)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20899action=view)
Possible patch

OK, maybe I came out too strong in my last comment.

It is possible to get the front-end to construct a real argument types list
from the arguments list of the external call, as is done in the patch attached.
Maybe it's worth putting in, I don't really know. It's a bit of a hack, but at
least it does work (and it regtests on x86_64-linux).


-- 


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