aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog10
-rw-r--r--gcc/fortran/trans-array.c7
-rw-r--r--gcc/fortran/trans-expr.c2
3 files changed, 16 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index de6fed3..8589e1c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,13 @@
+2005-11-02 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR fortran/18157
+ * trans-array.c (gfc_conv_resolve_dependencies): Use the correct
+ type for the temporary array.
+ * trans-expr.c (gfc_trans_assignment): Pass lss
+ instead of lss_section
+ to gfc_conv_resolve_dependencies to get the
+ correct type.
+
2005-11-02 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
* decl.c (gfc_match_entry): Function entries don't need an argument
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 72669f8..20d3c67 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -2542,10 +2542,13 @@ gfc_conv_resolve_dependencies (gfc_loopinfo * loop, gfc_ss * dest,
if (nDepend == 1)
{
+ tree base_type = gfc_typenode_for_spec (&dest->expr->ts);
+ if (GFC_ARRAY_TYPE_P (base_type)
+ || GFC_DESCRIPTOR_TYPE_P (base_type))
+ base_type = gfc_get_element_type (base_type);
loop->temp_ss = gfc_get_ss ();
loop->temp_ss->type = GFC_SS_TEMP;
- loop->temp_ss->data.temp.type =
- gfc_get_element_type (TREE_TYPE (dest->data.info.descriptor));
+ loop->temp_ss->data.temp.type = base_type;
loop->temp_ss->string_length = dest->string_length;
loop->temp_ss->data.temp.dimen = loop->dimen;
loop->temp_ss->next = gfc_ss_terminator;
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index f911487..a0339af 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -2719,7 +2719,7 @@ gfc_trans_assignment (gfc_expr * expr1, gfc_expr * expr2)
/* Calculate the bounds of the scalarization. */
gfc_conv_ss_startstride (&loop);
/* Resolve any data dependencies in the statement. */
- gfc_conv_resolve_dependencies (&loop, lss_section, rss);
+ gfc_conv_resolve_dependencies (&loop, lss, rss);
/* Setup the scalarizing loops. */
gfc_conv_loop_setup (&loop);