This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/40976] New: Merge DECL of procedure call with DECL of gfc_get_function_type


Motivated by PR 40969.

Currently, we generate a function declaration for

  procedure(<empty or interface>) :: proc

and another one for
  call proc(something) ! or var = proc(something)

If no explicit interface is known, the function argument is undefined, which
causes problems with LTO, cf. PR 40949 and PR 40969.

In principle, one could update the formal argument list of the "proc" symbol
when encountering the procedure call. That should be already done in the front
end and will also provide a means of diagnosing call errors such as:

   call proc(4)
   call proc(4.0, 4) ! wrong type, different number of arguments

Additionally, one should then re-use the DECL.


-- 
           Summary: Merge DECL of procedure call with DECL of
                    gfc_get_function_type
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-code, diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]