re PR fortran/44541 ([OOP] wrong code for polymorphic variable with INTENT(OUT)/Alloc...
authorJanus Weil <janus@gcc.gnu.org>
Thu, 2 Sep 2010 12:34:26 +0000 (14:34 +0200)
committerJanus Weil <janus@gcc.gnu.org>
Thu, 2 Sep 2010 12:34:26 +0000 (14:34 +0200)
2010-09-02  Janus Weil  <janus@gcc.gnu.org>

PR fortran/44541
* resolve.c (resolve_symbol): Correct check for attributes of CLASS
variable.

From-SVN: r163773

gcc/fortran/ChangeLog
gcc/fortran/resolve.c

index fb1fa4d26649c277b4c0ee98656b70eefe86a60b..05f94158b9a7bd1e0b33f343001018f930d0a74f 100644 (file)
@@ -1,3 +1,9 @@
+2010-09-02  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/44541
+       * resolve.c (resolve_symbol): Correct check for attributes of CLASS
+       variable.
+
 2010-09-02  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/45489
index 26175e4512cac3f81db8fea7d04fc8c593b754ac..6b922a0bfcdf3bc9b8daf9fe8fd93cd34ec758be 100644 (file)
@@ -12166,7 +12166,8 @@ resolve_symbol (gfc_symbol *sym)
 
   if (sym->ts.type == BT_CLASS && sym->ns == gfc_current_ns
       && sym->attr.dummy && sym->attr.intent == INTENT_OUT
-      && !sym->attr.pointer && !sym->attr.allocatable)
+      && !CLASS_DATA (sym)->attr.class_pointer
+      && !CLASS_DATA (sym)->attr.allocatable)
     apply_default_init (sym);
 
   /* If this symbol has a type-spec, check it.  */