From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4965 invoked by alias); 5 Aug 2009 19:46:26 -0000 Received: (qmail 4900 invoked by uid 48); 5 Aug 2009 19:46:14 -0000 Date: Wed, 05 Aug 2009 19:46:00 -0000 Subject: [Bug fortran/40976] New: Merge DECL of procedure call with DECL of gfc_get_function_type X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-08/txt/msg00577.txt.bz2 Motivated by PR 40969. Currently, we generate a function declaration for procedure() :: 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