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
This commit is contained in:
Janus Weil 2013-08-20 16:16:26 +02:00
parent 67598720af
commit bf7a6c1cb1
4 changed files with 29 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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",

View File

@ -1,3 +1,8 @@
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

View File

@ -0,0 +1,17 @@
! { 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