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.
See also vaguely related PR 40978.
Another complication is due to: a) Procedure pointer b) Procedure pointer components (Type-bound procedures are no problem as they have always an explicit interface.)
For PPC, see also PR 41107 and the link therein.
Could pr41056 be related to this one?
I think PR42122 is possibly related ...
I will look at this for a bit. However, if anybody wants to work on this, be my guest.
*** Bug 91390 has been marked as a duplicate of this bug. ***