aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorDaniel Franke <franke.daniel@gmail.com>2008-01-22 07:19:54 -0500
committerDaniel Franke <dfranke@gcc.gnu.org>2008-01-22 07:19:54 -0500
commitc29164019f085d149e86412dfbbe0adeb79eeaba (patch)
tree4ccd11ff53ce8a7677ff63920917386f216d8026 /gcc/fortran/expr.c
parent0387c1429da4a44bfe71b587cce23bb76d283ab8 (diff)
downloadgcc-c29164019f085d149e86412dfbbe0adeb79eeaba.zip
gcc-c29164019f085d149e86412dfbbe0adeb79eeaba.tar.gz
gcc-c29164019f085d149e86412dfbbe0adeb79eeaba.tar.bz2
re PR fortran/34915 (-std=f95 rejects len_trim() and index() in init expressions)
gcc/fortran: 2008-01-22 Daniel Franke <franke.daniel@gmail.com> PR fortran/34915 * expr.c (check_elemental): Fix check for valid data types. gcc/testsuite: 2008-01-22 Daniel Franke <franke.daniel@gmail.com> PR fortran/34915 * gfortran.dg/initialization_18.f90: New test. From-SVN: r131715
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index e8b6548..fb1886e 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -2109,7 +2109,8 @@ check_elemental (gfc_expr *e)
|| !e->value.function.isym->elemental)
return MATCH_NO;
- if ((e->ts.type != BT_INTEGER || e->ts.type != BT_CHARACTER)
+ if (e->ts.type != BT_INTEGER
+ && e->ts.type != BT_CHARACTER
&& gfc_notify_std (GFC_STD_F2003, "Extension: Evaluation of "
"nonstandard initialization expression at %L",
&e->where) == FAILURE)