Commit bf7a6c1c by Janus Weil

re PR fortran/53655 ([F03] "default initializer" warnings)

2013-08-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/53655
	* trans-decl.c (generate_local_decl): Check if type has any components.

2013-08-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/53655
	* gfortran.dg/intent_out_8.f90: New.

From-SVN: r201884
parent 67598720
2013-08-20 Janus Weil <janus@gcc.gnu.org>
PR fortran/53655
* trans-decl.c (generate_local_decl): Check if type has any components.
2013-08-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/46271
......
......@@ -4745,7 +4745,8 @@ generate_local_decl (gfc_symbol * sym)
gfc_warning ("Dummy argument '%s' at %L was declared "
"INTENT(OUT) but was not set", sym->name,
&sym->declared_at);
else if (!gfc_has_default_initializer (sym->ts.u.derived))
else if (!gfc_has_default_initializer (sym->ts.u.derived)
&& !sym->ts.u.derived->attr.zero_comp)
gfc_warning ("Derived-type dummy argument '%s' at %L was "
"declared INTENT(OUT) but was not set and "
"does not have a default initializer",
......
2013-08-20 Janus Weil <janus@gcc.gnu.org>
PR fortran/53655
* gfortran.dg/intent_out_8.f90: New.
2013-08-20 Teresa Johnson <tejohnson@google.com>
PR rtl-optimizations/57451
......
! { dg-do compile }
! { dg-options "-Wall" }
!
! PR 53655: [F03] "default initializer" warnings
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
type t
end type t
contains
subroutine foo(x)
type(t), intent(out) :: x
end subroutine
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment