diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2012-09-17 19:53:37 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-09-17 19:53:37 +0200 |
commit | 61aa9333bad2876fb298f454dfd3d42836226f5e (patch) | |
tree | 78a487dabf506ac90d65b5d1faa23368d7747b19 /gcc/fortran | |
parent | f588eb27dd5ec50e54b282096211228dead9d4ba (diff) | |
download | gcc-61aa9333bad2876fb298f454dfd3d42836226f5e.zip gcc-61aa9333bad2876fb298f454dfd3d42836226f5e.tar.gz gcc-61aa9333bad2876fb298f454dfd3d42836226f5e.tar.bz2 |
re PR fortran/54608 (Wrong-code with SCAN and VERIFY)
2012-09-17 Tobias Burnus <burnus@net-b.de>
PR fortran/54608
* simplify.c (gfc_simplify_scan, gfc_simplify_verify):
Fix handling of BACK=variable.
2012-09-17 Tobias Burnus <burnus@net-b.de>
PR fortran/54608
* gfortran.dg/scan_2.f90: New.
From-SVN: r191403
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/simplify.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 3d7e009..3552ffc 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2012-09-17 Tobias Burnus <burnus@net-b.de> + + PR fortran/54608 + * simplify.c (gfc_simplify_scan, gfc_simplify_verify): + Fix handling of BACK=variable. + 2012-09-17 Janus Weil <janus@gcc.gnu.org> PR fortran/54285 diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 5aa2704..1c9dff2 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -5247,7 +5247,8 @@ gfc_simplify_scan (gfc_expr *e, gfc_expr *c, gfc_expr *b, gfc_expr *kind) if (k == -1) return &gfc_bad_expr; - if (e->expr_type != EXPR_CONSTANT || c->expr_type != EXPR_CONSTANT) + if (e->expr_type != EXPR_CONSTANT || c->expr_type != EXPR_CONSTANT + || ( b != NULL && b->expr_type != EXPR_CONSTANT)) return NULL; if (b != NULL && b->value.logical != 0) @@ -6335,7 +6336,8 @@ gfc_simplify_verify (gfc_expr *s, gfc_expr *set, gfc_expr *b, gfc_expr *kind) if (k == -1) return &gfc_bad_expr; - if (s->expr_type != EXPR_CONSTANT || set->expr_type != EXPR_CONSTANT) + if (s->expr_type != EXPR_CONSTANT || set->expr_type != EXPR_CONSTANT + || ( b != NULL && b->expr_type != EXPR_CONSTANT)) return NULL; if (b != NULL && b->value.logical != 0) |