The attached patch fixes an ICE for scalar coarray with -fcoarray=lib.
Additionally, I have change the dg-do compile into a run, which I forgot
to do when initially submitting the patch.
Committed as Rev. 172522.
Tobias
PS: All coarray*.f90 dg-do run test also work with "-fcoarray=lib
-lcaf_single".
Index: gcc/testsuite/gfortran.dg/coarray_15.f90
===================================================================
--- gcc/testsuite/gfortran.dg/coarray_15.f90 (Revision 172521)
+++ gcc/testsuite/gfortran.dg/coarray_15.f90 (Arbeitskopie)
@@ -1,4 +1,4 @@
-! { dg-do compile }
+! { dg-do run }
! { dg-options "-fcoarray=single" }
!
! PR fortran/18918
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog (Revision 172521)
+++ gcc/testsuite/ChangeLog (Arbeitskopie)
@@ -1,3 +1,8 @@
+2011-04-15 Tobias Burnus <bur...@net-b.de>
+
+ PR fortran/18918
+ * gfortran.dg/coarray_15.f90: Change to dg-do run.
+
2011-04-15 Nicola Pero <nicola.p...@meta-innovation.com>
* objc.dg/naming-4.m: Updated.
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog (Revision 172521)
+++ gcc/fortran/ChangeLog (Arbeitskopie)
@@ -1,3 +1,9 @@
+2011-04-15 Tobias Burnus <bur...@net-b.de>
+
+ PR fortran/18918
+ * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
+ code which is also causing an ICE.
+
2011-04-14 Nathan Froyd <froy...@codesourcery.com>
* f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
Index: gcc/fortran/trans-intrinsic.c
===================================================================
--- gcc/fortran/trans-intrinsic.c (Revision 172521)
+++ gcc/fortran/trans-intrinsic.c (Arbeitskopie)
@@ -1129,7 +1129,6 @@
gfc_ss *ss;
tree bound, resbound, resbound2, desc, cond, tmp;
tree type;
- gfc_array_spec * as;
int corank;
gcc_assert (expr->value.function.isym->id == GFC_ISYM_LCOBOUND
@@ -1142,9 +1141,6 @@
gcc_assert (arg->expr->expr_type == EXPR_VARIABLE);
corank = gfc_get_corank (arg->expr);
- as = gfc_get_full_arrayspec_from_expr (arg->expr);
- gcc_assert (as);
-
ss = gfc_walk_expr (arg->expr);
gcc_assert (ss != gfc_ss_terminator);
ss->data.info.codimen = corank;