]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/50163 (ICE: initialization expression)
authorTobias Burnus <burnus@net-b.de>
Tue, 30 Aug 2011 06:50:22 +0000 (08:50 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Tue, 30 Aug 2011 06:50:22 +0000 (08:50 +0200)
2011-08-30  Tobias Burnus  <burnus@net-b.de>

        PR fortran/50163
        * check_init_expr (check_init_expr): Return when an error
        * occured.

2011-08-30  Tobias Burnus  <burnus@net-b.de>

        PR fortran/50163
        * gfortran.dg/initialization_28.f90: New.

From-SVN: r178280

gcc/fortran/ChangeLog
gcc/fortran/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/initialization_28.f90 [new file with mode: 0644]

index ba107157cce1f65c35279b1819c98f1af63a31fe..b6733fc553ca40cdc36169f8cd31f9ec65aae0f6 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-30  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/50163
+       * check_init_expr (check_init_expr): Return when an error occured.
+
 2011-08-16  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/42051
index 73587a2800077efeaa4caffbaa43036d9df60e87..2024011fc1cdc786be7dc012719ceac156648aa7 100644 (file)
@@ -2335,6 +2335,9 @@ check_init_expr (gfc_expr *e)
            m = MATCH_ERROR;
          }
 
+       if (m == MATCH_ERROR)
+         return FAILURE;
+
        /* Try to scalarize an elemental intrinsic function that has an
           array argument.  */
        isym = gfc_find_function (e->symtree->n.sym->name);
index 69d2ebf4321a9dfda6a157a8e7b44200eacf8f79..668b0eeb99f181c412cb5c5c48c0cb99f48c32c2 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-30  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/50163
+       * gfortran.dg/initialization_28.f90: New.
+
 2011-08-19  Tobias Burnus  <burnus@net-b.de>
 
        Backport from mainline
diff --git a/gcc/testsuite/gfortran.dg/initialization_28.f90 b/gcc/testsuite/gfortran.dg/initialization_28.f90
new file mode 100644 (file)
index 0000000..f533053
--- /dev/null
@@ -0,0 +1,9 @@
+! { dg-do compile }
+!
+! PR fortran/50163
+!
+! Contributed by Philip Mason
+!
+character(len=2) :: xx ='aa'
+integer :: iloc=index(xx,'bb') ! { dg-error "has not been declared or is a variable" }
+end