aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2004-10-07 00:43:21 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2004-10-07 00:43:21 +0000
commit2b58638b467a5788cbeb2ddecb8186e50cc655e1 (patch)
tree510d55097ada56c1bc250ed1cde1c4e9b69eece0 /gcc/fortran/trans-array.c
parentd1d525310beefc660673ca07246a4eb14b342503 (diff)
downloadgcc-2b58638b467a5788cbeb2ddecb8186e50cc655e1.zip
gcc-2b58638b467a5788cbeb2ddecb8186e50cc655e1.tar.gz
gcc-2b58638b467a5788cbeb2ddecb8186e50cc655e1.tar.bz2
re PR fortran/17678 (USE statement incorrectly initializes allocatable array)
PR fortran/17678 * trans-array.c (gfc_trans_deferred_array): Leave use associated variables alone. testsuite/ * gfortran.dg/use_allocated_1.f90: New test. From-SVN: r88655
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index a6397d3..d36155d 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -3999,8 +3999,8 @@ gfc_trans_deferred_array (gfc_symbol * sym, tree body)
&& !INTEGER_CST_P (sym->ts.cl->backend_decl))
gfc_trans_init_string_length (sym->ts.cl, &fnblock);
- /* Parameter variables don't need anything special. */
- if (sym->attr.dummy)
+ /* Parameter and use associated variables don't need anything special. */
+ if (sym->attr.dummy || sym->attr.use_assoc)
{
gfc_add_expr_to_block (&fnblock, body);