------- Comment #9 from burnus at gcc dot gnu dot org  2009-08-05 19:33 -------
(In reply to comment #6)
> 21        if ( a1 != *a2 ) abort();
> (gdb) p a1
> $1 = 0
> (gdb) p *a2
> $2 = 42

Thanks! I think the following patch should cure this. I think we will still
have issues with LTO but those are inevitable and need to be solved on the
middle end.

Index: trans-types.c
===================================================================
--- trans-types.c       (Revision 150497)
+++ trans-types.c       (Arbeitskopie)
@@ -2324,7 +2324,10 @@
   while (nstr--)
     typelist = gfc_chainon_list (typelist, gfc_charlen_type_node);

-  typelist = gfc_chainon_list (typelist, void_type_node);
+  /* If the explicit interface is known, we tell the middle end
+     that no more additional arguments will follow in calls.  */
+  if (sym->attr.if_source != IFSRC_UNKNOWN)
+    typelist = gfc_chainon_list (typelist, void_type_node);

   if (alternate_return)
     type = integer_type_node;


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |burnus at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-05 19:33:47
               date|                            |


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

Reply via email to