From dd39f7830a217efd7528ff0bfacb8163ebae7b9f Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Wed, 12 Sep 2007 11:49:04 +0200 Subject: trans-expr.c (gfc_conv_initializer): Fix expr == NULL check. 2007-09-12 Tobias Burnus * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check. From-SVN: r128422 --- gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/trans-expr.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c6c9ff8..f16d667 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2007-09-12 Tobias Burnus + + * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check. + 2007-09-12 Jan Hubicka * f95-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill. diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 7e71a72..b6eb33a 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -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; -- cgit v1.1