PR fortran/34545
* module.c (load_needed): If the namespace has no proc_name
give it the module symbol.
2008-01-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34545
* gfortran.dg/use_12.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131364
138bc75d-0d04-0410-961f-
82ee72b054a4
-2008-01-06 Tobias Burnus <burnus@net-b.de>
+2008-01-06 Paul Thomas <pault@gcc.gnu.org>
- PR fortran/34689
- * interface.c (compare_actual_formal): Fix intent(out) check for
- function result variables.
+ PR fortran/34545
+ * module.c (load_needed): If the namespace has no proc_name
+ give it the module symbol.
2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
associate_integer_pointer (q, ns);
}
+ /* Use the module sym as 'proc_name' so that gfc_get_symbol_decl
+ doesn't go pear-shaped if the symbol is used. */
+ if (!ns->proc_name)
+ gfc_find_symbol (p->u.rsym.module, gfc_current_ns,
+ 1, &ns->proc_name);
+
sym = gfc_new_symbol (p->u.rsym.true_name, ns);
sym->module = gfc_get_string (p->u.rsym.module);
strcpy (sym->binding_label, p->u.rsym.binding_label);
+2008-01-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/34545
+ * gfortran.dg/use_12.f90: New test.
+
+2008-01-06 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/34689
+ * interface.c (compare_actual_formal): Fix intent(out) check for
+ function result variables.
+
2008-01-06 Tobias Burnus <burnus@net-b.de>
PR fortran/34690
--- /dev/null
+! { dg-do compile }
+! Tests the fix of PR34545, in which the 'numclusters' that determines the size
+! of fnres was not properly associated.
+!
+! Reported by Jon D. Richards <jon_d_r@msn.com>
+!
+module m1
+ integer :: numclusters = 2
+end module m1
+
+module m2
+ contains
+ function get_nfirst( ) result(fnres)
+ use m1, only: numclusters
+ real :: fnres(numclusters) ! change to REAL and it works!!
+ end function get_nfirst
+end module m2
+
+program kmeans_driver
+ use m1
+ use m2
+ integer :: nfirst(3)
+ nfirst(1:numclusters) = get_nfirst( )
+end program kmeans_driver
+! { dg-final { cleanup-modules "m1 m2" } }