2009-11-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Nov 2009 21:52:52 +0000 (21:52 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Nov 2009 21:52:52 +0000 (21:52 +0000)
PR fortran/41807
* trans-const.c (gfc_conv_const): Set se->expr to a constant on error.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154690 138bc75d-0d04-0410-961f-82ee72b054a4

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

index a29a34c..e2eadb2 100644 (file)
@@ -1,5 +1,10 @@
 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
        * trans-array.c (gfc_conv_array_transpose): Delete unnecessary assert.
 
index e2cd40b..7452088 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;
     }