PR fortran/21977
* gfortran.dg/nesting_2.f90: New test.
* gfortran.dg/nesting_3.f90: New test.
2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
PR fortran/21977
* trans-decl.c (gfc_generate_function_code): Move the NULLing of
current_fake_result_decl down to below generate_local_vars.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109503
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR fortran/21977
+ * trans-decl.c (gfc_generate_function_code): Move the NULLing of
+ current_fake_result_decl down to below generate_local_vars.
+
2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
PR fortran/12456
trans_function_start (sym);
- /* Will be created as needed. */
- current_fake_result_decl = NULL_TREE;
-
gfc_start_block (&block);
if (ns->entries && ns->proc_name->ts.type == BT_CHARACTER)
gfc_generate_contained_functions (ns);
generate_local_vars (ns);
-
+
+ /* Will be created as needed. */
+ current_fake_result_decl = NULL_TREE;
current_function_return_label = NULL;
/* Now generate the code for the body of this function. */
+2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR fortran/21977
+ * gfortran.dg/nesting_2.f90: New test.
+ * gfortran.dg/nesting_3.f90: New test.
+
2006-01-09 Hans-Peter Nilsson <hp@axis.com>
* gcc.dg/Wpadded.c: Gate alignment warning on ! default_packed.
--- /dev/null
+! check to make the nested function dawsonseries_v gets the correct
+! fake return decl and that the outer (dawson_v) has an assignment of
+! just the fake return decl for real and not the inner's return decl.
+FUNCTION dawson_v()
+ IMPLICIT NONE
+ REAL :: dawson_v
+ dawson_v = 1.0
+
+ CONTAINS
+ FUNCTION dawsonseries_v()
+ IMPLICIT NONE
+ REAL, DIMENSION(1) :: dawsonseries_v
+ dawsonseries_v=1.0
+ END FUNCTION dawsonseries_v
+END FUNCTION dawson_v
--- /dev/null
+! check to make the nested function dawsonseries_v gets the correct
+! fake return decl and that the outer (dawson_v) has an assignment of
+! just the fake return decl for real and not the inner's return decl.
+FUNCTION dawson_v()
+ IMPLICIT NONE
+ REAL,DIMENSION(1) :: dawson_v
+ dawson_v = 1.0
+ CONTAINS
+ FUNCTION dawsonseries_v()
+ IMPLICIT NONE
+ REAL, DIMENSION(1) :: dawsonseries_v
+ dawsonseries_v=1.0
+ END FUNCTION dawsonseries_v
+END FUNCTION dawson_v