From f0fc6ae664bae1a379cadce12d1e4177449e9b9b Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Fri, 4 May 2007 09:26:41 +0000 Subject: [PATCH] re PR fortran/31781 (fortran regressions on trunk if you --disable-checking) PR fortran/31781 * simplify.c (gfc_simplify_repeat): Don't put function call with side effect in a gcc_assert(). From-SVN: r124412 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/simplify.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index aa9fb997732b..ee9918692728 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2007-05-04 Francois-Xavier Coudert + + PR fortran/31781 + * simplify.c (gfc_simplify_repeat): Don't put function call with + side effect in a gcc_assert(). + 2007-05-04 Tobias Burnus PR fortran/25071 diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index b31597d170bc..3065c0287051 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -2919,7 +2919,10 @@ gfc_simplify_repeat (gfc_expr *e, gfc_expr *n) return NULL; if (mpz_sgn (e->ts.cl->length->value.integer) != 0) - gcc_assert (gfc_extract_int (n, &ncop) == NULL); + { + const char *res = gfc_extract_int (n, &ncop); + gcc_assert (res == NULL); + } else ncop = 0;