trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.
authorTobias Burnus <burnus@net-b.de>
Wed, 12 Sep 2007 09:49:04 +0000 (11:49 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Wed, 12 Sep 2007 09:49:04 +0000 (11:49 +0200)
2007-09-12  Tobias Burnus  <burnus@net-b.de>

* trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.

From-SVN: r128422

gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c

index c6c9ff87e90acfe2b4d0fe1c1f2ca75f29e93231..f16d66710df551c76af8ac8004c7e8be05a8e706 100644 (file)
@@ -1,3 +1,7 @@
+2007-09-12  Tobias Burnus  <burnus@net-b.de>
+
+       * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.
+
 2007-09-12  Jan Hubicka  <jh@suse.cz>
 
        * f95-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
index 7e71a72201626f566f292447a32aefedb6c00cde..b6eb33aa312d1b63d7a29fb833d878741e59f33d 100644 (file)
@@ -2855,7 +2855,8 @@ gfc_conv_initializer (gfc_expr * expr, gfc_typespec * ts, tree type,
      (these are the only two iso_c_binding derived types that can be
      used as initialization expressions).  If so, we need to modify
      the 'expr' to be that for a (void *).  */
-  if (expr->ts.type == BT_DERIVED && expr->ts.is_iso_c && expr->ts.derived)
+  if (expr != NULL && expr->ts.type == BT_DERIVED
+      && expr->ts.is_iso_c && expr->ts.derived)
     {
       gfc_symbol *derived = expr->ts.derived;