aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2007-12-22 01:57:07 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2007-12-22 01:57:07 +0000
commit565e50452f91d43f2e5846855e1f030f5b6f4cd9 (patch)
tree4c6df1c185b06e490d6200a47f70c59619d8f76e /gcc
parent94919bd2bcacb6091c27c14cb0228f22bb9579f1 (diff)
downloadgcc-565e50452f91d43f2e5846855e1f030f5b6f4cd9.zip
gcc-565e50452f91d43f2e5846855e1f030f5b6f4cd9.tar.gz
gcc-565e50452f91d43f2e5846855e1f030f5b6f4cd9.tar.bz2
re PR libfortran/34540 (cshift, eoshift, kind=1 and kind=2 arguments...)
2007-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/34540 * iresolve.c (gfc_resolve_cshift): Take optional dim path only if the argument is an optional itself. * iresolve.c (gfc_resolve_eoshift): Same. From-SVN: r131133
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/iresolve.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index f90a077..c67dca5 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+2007-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/34540
+ * iresolve.c (gfc_resolve_cshift): Take optional dim path
+ only if the argument is an optional itself.
+ * iresolve.c (gfc_resolve_eoshift): Same.
+
2007-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34438
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
index a68e42e..cdc4ac1 100644
--- a/gcc/fortran/iresolve.c
+++ b/gcc/fortran/iresolve.c
@@ -590,7 +590,7 @@ gfc_resolve_cshift (gfc_expr *f, gfc_expr *array, gfc_expr *shift,
if (dim != NULL)
{
- if (dim->expr_type != EXPR_CONSTANT)
+ if (dim->expr_type != EXPR_CONSTANT && dim->symtree->n.sym->attr.optional)
{
/* Mark this for later setting the type in gfc_conv_missing_dummy. */
dim->representation.length = shift->ts.kind;
@@ -728,7 +728,7 @@ gfc_resolve_eoshift (gfc_expr *f, gfc_expr *array, gfc_expr *shift,
if (dim != NULL)
{
- if (dim->expr_type != EXPR_CONSTANT)
+ if (dim->expr_type != EXPR_CONSTANT && dim->symtree->n.sym->attr.optional)
{
/* Mark this for later setting the type in gfc_conv_missing_dummy. */
dim->representation.length = shift->ts.kind;