[Bug fortran/45674] [OOP] Undefined references for extended types

2016-11-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45674

janus at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0

[Bug fortran/45674] [OOP] Undefined references for extended types

2010-09-16 Thread dominiq at lps dot ens dot fr


--- Comment #4 from dominiq at lps dot ens dot fr  2010-09-16 08:50 ---
 (I have not regtested this yet.)

The (second) patch in comment #2 fixes the pr without regression.


-- 


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



[Bug fortran/45674] [OOP] Undefined references for extended types

2010-09-16 Thread janus at gcc dot gnu dot org


--- Comment #5 from janus at gcc dot gnu dot org  2010-09-16 12:10 ---
(In reply to comment #3)
 Thanks for the quick fix!

Well, it was *your* fix, so *I* should thank *you* :)

Anyway, I think the patch in comment #2 qualifies as obvious, and has no
regressions, as noted by Dominique. Will commit soon.


-- 

janus at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |janus at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-09-15 13:57:41 |2010-09-16 12:10:46
   date||


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



[Bug fortran/45674] [OOP] Undefined references for extended types

2010-09-16 Thread janus at gcc dot gnu dot org


--- Comment #6 from janus at gcc dot gnu dot org  2010-09-16 13:13 ---
Subject: Bug 45674

Author: janus
Date: Thu Sep 16 13:12:59 2010
New Revision: 164338

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164338
Log:
2010-09-16  Janus Weil  ja...@gcc.gnu.org

PR fortran/45674
* interface.c (compare_parameter): Create vtab for actual argument,
instead of formal (if needed).


2010-09-16  Janus Weil  ja...@gcc.gnu.org

PR fortran/45674
* gfortran.dg/class_dummy_2.f03: New.

Added:
trunk/gcc/testsuite/gfortran.dg/class_dummy_2.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/45674] [OOP] Undefined references for extended types

2010-09-16 Thread janus at gcc dot gnu dot org


--- Comment #7 from janus at gcc dot gnu dot org  2010-09-16 13:14 ---
Fixed with r164338. Closing.

Thanks for the report!


-- 

janus at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/45674] [OOP] Undefined references for extended types

2010-09-15 Thread janus at gcc dot gnu dot org


--- Comment #1 from janus at gcc dot gnu dot org  2010-09-15 13:57 ---
Confirmed. From a quick glimpse it seems the patch goes in the right direction.
Will have a closer look soon.


-- 

janus at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-09-15 13:57:41
   date||


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



[Bug fortran/45674] [OOP] Undefined references for extended types

2010-09-15 Thread janus at gcc dot gnu dot org


--- Comment #2 from janus at gcc dot gnu dot org  2010-09-15 14:46 ---
(In reply to comment #0)
 Index: fortran/interface.c
 ===
 --- fortran/interface.c (revision 164288)
 +++ fortran/interface.c (working copy)
 @@ -1428,10 +1428,12 @@
 actual-ts.u.derived  actual-ts.u.derived-ts.is_iso_c)
  return 1;
 
 -  if (formal-ts.type == BT_CLASS)
 +  if (formal-ts.type == BT_CLASS) {
  /* Make sure the vtab symbol is present when
 the module variables are generated.  */
  gfc_find_derived_vtab (formal-ts.u.derived);
 +gfc_find_derived_vtab (actual-ts.u.derived);
 +  }
 
if (actual-ts.type == BT_PROCEDURE)
  {
 

Actually I think this patch is ok. Are you interested in committing it
yourself? [Note that you'll need an FSF copyright assignment, if you don't
already have one.] Otherwise I can commit it for you.

Side note: One can (should) extend the patch in the following way ...

Index: gcc/fortran/interface.c
===
--- gcc/fortran/interface.c (revision 164304)
+++ gcc/fortran/interface.c (working copy)
@@ -1428,10 +1428,10 @@ compare_parameter (gfc_symbol *formal, gfc_expr *a
actual-ts.u.derived  actual-ts.u.derived-ts.is_iso_c)
 return 1;

-  if (formal-ts.type == BT_CLASS)
+  if (formal-ts.type == BT_CLASS  actual-ts.type == BT_DERIVED)
 /* Make sure the vtab symbol is present when
the module variables are generated.  */
-gfc_find_derived_vtab (formal-ts.u.derived);
+gfc_find_derived_vtab (actual-ts.u.derived);

   if (actual-ts.type == BT_PROCEDURE)
 {


(I have not regtested this yet.)


-- 


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



[Bug fortran/45674] [OOP] Undefined references for extended types

2010-09-15 Thread dietmar dot ebner at gmail dot com


--- Comment #3 from dietmar dot ebner at gmail dot com  2010-09-15 15:36 
---
(In reply to comment #2)
 Actually I think this patch is ok. Are you interested in committing it
 yourself? [Note that you'll need an FSF copyright assignment, if you don't
 already have one.] Otherwise I can commit it for you.
I don't have the copyright assignment in place so please go ahead and do it.

Thanks for the quick fix!


-- 


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