re PR fortran/41807 (data statement with nested type constructors)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 26 Nov 2009 21:52:52 +0000 (21:52 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 26 Nov 2009 21:52:52 +0000 (21:52 +0000)
2009-11-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/41807
* trans-const.c (gfc_conv_const): Set se->expr to a constant on error.

From-SVN: r154690

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

index a29a34c7d575c57c2698e01a5c314ff1e8a0cb63..e2eadb272cd35a1f6b35c62997b29492ac80a44d 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/41807
+       * trans-const.c (gfc_conv_const): Set se->expr to a constant on error.
+
 2009-11-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR fortran/41278
index e2cd40bc954d81c37b1cf2e3b9df0d7b9e6834e2..74520889d7e071519e42fdf66f0ca9b7477baa0d 100644 (file)
@@ -356,6 +356,7 @@ gfc_conv_constant (gfc_se * se, gfc_expr * expr)
   if (expr->expr_type != EXPR_CONSTANT)
     {
       gfc_error ("non-constant initialization expression at %L", &expr->where);
+      se->expr = gfc_conv_constant_to_tree (gfc_int_expr (0));
       return;
     }