aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/misc.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2009-08-10 11:19:24 +0200
committerJanus Weil <janus@gcc.gnu.org>2009-08-10 11:19:24 +0200
commit727e85447dbd3342ca487b7179dc8a06a853f681 (patch)
treeaf7da891a51a852fbcada6ef52aef9d436f99528 /gcc/fortran/misc.c
parent477eca006cf19ab67eb0d5c7e9af8872eb5a6d22 (diff)
downloadgcc-727e85447dbd3342ca487b7179dc8a06a853f681.zip
gcc-727e85447dbd3342ca487b7179dc8a06a853f681.tar.gz
gcc-727e85447dbd3342ca487b7179dc8a06a853f681.tar.bz2
re PR fortran/40940 ([F03] CLASS statement)
2009-08-10 Janus Weil <janus@gcc.gnu.org> PR fortran/40940 * decl.c (gfc_match_type_spec): Match CLASS statement and warn about missing polymorphism. * gfortran.h (gfc_typespec): Add field 'is_class'. * misc.c (gfc_clear_ts): Initialize 'is_class' to zero. * resolve.c (type_is_extensible): New function to check if a derived type is extensible. (resolve_fl_variable_derived): Add error checks for CLASS variables. (resolve_typebound_procedure): Disallow non-polymorphic passed-object dummy arguments, turning warning into error. (resolve_fl_derived): Use 'type_is_extensible'. Disallow non-polymorphic passed-object dummy arguments for procedure pointer components, turning warning into error. Add error check for CLASS components. 2009-08-10 Janus Weil <janus@gcc.gnu.org> PR fortran/40940 * gfortran.dg/class_1.f03: New. * gfortran.dg/class_2.f03: New. * gfortran.dg/proc_ptr_comp_pass_1.f90: Use CLASS instead of TYPE. * gfortran.dg/proc_ptr_comp_pass_2.f90: Ditto. * gfortran.dg/proc_ptr_comp_pass_3.f90: Ditto. * gfortran.dg/typebound_call_10.f03: Ditto. * gfortran.dg/typebound_call_2.f03: Ditto. * gfortran.dg/typebound_call_3.f03: Ditto. * gfortran.dg/typebound_call_4.f03: Ditto. * gfortran.dg/typebound_generic_3.f03: Ditto. * gfortran.dg/typebound_generic_4.f03: Ditto. * gfortran.dg/typebound_proc_1.f08: Ditto. * gfortran.dg/typebound_proc_5.f03: Ditto. * gfortran.dg/typebound_proc_6.f03: Ditto. From-SVN: r150620
Diffstat (limited to 'gcc/fortran/misc.c')
-rw-r--r--gcc/fortran/misc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fortran/misc.c b/gcc/fortran/misc.c
index 94d61c9..7e4b481 100644
--- a/gcc/fortran/misc.c
+++ b/gcc/fortran/misc.c
@@ -71,6 +71,7 @@ gfc_clear_ts (gfc_typespec *ts)
ts->kind = 0;
ts->cl = NULL;
ts->interface = NULL;
+ ts->is_class = 0;
/* flag that says if the type is C interoperable */
ts->is_c_interop = 0;
/* says what f90 type the C kind interops with */