diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2009-03-31 20:05:44 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2009-03-31 20:05:44 +0000 |
commit | e49be8f7c371881733a0f9b0c7ecccef5232f10e (patch) | |
tree | 821da1a5b2c279999ca9eb0b101be73abc85c3ff /gcc/fortran/expr.c | |
parent | bf0d171aead0443d546cf48d714ea84ecbb6ab91 (diff) | |
download | gcc-e49be8f7c371881733a0f9b0c7ecccef5232f10e.zip gcc-e49be8f7c371881733a0f9b0c7ecccef5232f10e.tar.gz gcc-e49be8f7c371881733a0f9b0c7ecccef5232f10e.tar.bz2 |
re PR fortran/38917 (Can't use DATA to initialize pointer to array to NULL())
2009-03-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/38917
* expr.c (gfc_check_assign): Allow pointer components when
checking for NULL.
PR fortran/38918
* resolve.c (check_data_variable): Treat pointer arrays with
scalars.
2009-03-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/38917
PR fortran/38918
* gfortran.dg/data_pointer_1.f90: New test.
From-SVN: r145371
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 8dec53f..233516e 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -2913,7 +2913,7 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform) if (rvalue->expr_type == EXPR_NULL) { - if (lvalue->symtree->n.sym->attr.pointer + if (has_pointer && (ref == NULL || ref->next == NULL) && lvalue->symtree->n.sym->attr.data) return SUCCESS; else |