aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2011-08-25 19:10:06 +0000
committerMikael Morin <mikael@gcc.gnu.org>2011-08-25 19:10:06 +0000
commitd54e80ce32abdfdbfbc8cd2265091a4187c3efed (patch)
treebe3ae41029778855998bde1d67e542a10f66ae45 /gcc/fortran/resolve.c
parent42aa5124f7a7173d1972668378a9531949f92599 (diff)
downloadgcc-d54e80ce32abdfdbfbc8cd2265091a4187c3efed.zip
gcc-d54e80ce32abdfdbfbc8cd2265091a4187c3efed.tar.gz
gcc-d54e80ce32abdfdbfbc8cd2265091a4187c3efed.tar.bz2
re PR fortran/50050 (Internal compiler error free_expr0 at expr.c:3709 via gfc_done_2)
2011-08-25 Mikael Morin <mikael.morin@gcc.gnu.org> PR fortran/50050 * expr.c (gfc_free_shape): Do nothing if shape is NULL. (free_expr0): Remove redundant NULL shape check. * resolve.c (check_host_association): Ditto. * trans-expr.c (gfc_trans_subarray_assign): Assert that shape is non-NULL. * trans-io.c (transfer_array_component): Ditto. 2011-08-25 Mikael Morin <mikael.morin@gcc.gnu.org> PR fortran/50050 * gfortran.dg/pointer_comp_init_1.f90: New test. From-SVN: r178086
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index e342723..436c160 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -5198,8 +5198,7 @@ check_host_association (gfc_expr *e)
&& sym->attr.contained)
{
/* Clear the shape, since it might not be valid. */
- if (e->shape != NULL)
- gfc_free_shape (&e->shape, e->rank);
+ gfc_free_shape (&e->shape, e->rank);
/* Give the expression the right symtree! */
gfc_find_sym_tree (e->symtree->name, NULL, 1, &st);