Bug 44936 - [OOP] Generic TBP not resolved correctly at compile time
Summary: [OOP] Generic TBP not resolved correctly at compile time
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: janus
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2010-07-14 18:32 UTC by Salvatore Filippone
Modified: 2010-07-15 13:42 UTC (History)
2 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2010-07-14 19:15:34


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Salvatore Filippone 2010-07-14 18:32:12 UTC
Following the discussion in 
http://gcc.gnu.org/ml/fortran/2010-07/msg00174.html
this is a split of a test case I had added to PR42385, taken from 43945, but it does not quite belong there. 
The problem is: the static resolution mechanism that is invoked when the type is knonwn at compile time goes wrong when the base type has a binding-name different from the procedure-name.
Comment 1 Salvatore Filippone 2010-07-14 18:33:56 UTC
See attachment #21184 [details]
Comment 3 janus 2010-07-15 13:36:42 UTC
Subject: Bug 44936

Author: janus
Date: Thu Jul 15 13:36:28 2010
New Revision: 162221

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162221
Log:
2010-07-15  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44936
	* resolve.c (resolve_typebound_generic_call): Resolve generic
	non-polymorphic type-bound procedure calls to the correct specific
	procedure.
	(resolve_typebound_subroutine): Remove superfluous code.


2010-07-15  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44936
	* gfortran.dg/typebound_generic_9.f03: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/typebound_generic_9.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog

Comment 4 janus 2010-07-15 13:42:37 UTC
Fixed with r162221. Closing.