diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-08-27 14:03:41 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-08-27 14:03:41 +0200 |
commit | 1d6368551e85cac41df6df4234d865918b693319 (patch) | |
tree | 4fda2ff21c6c4925e57041ec9ffdb79d95b3afc4 /gcc/fortran | |
parent | 6c513d43fb33ccd370998b3efae513f4f3a203be (diff) | |
download | gcc-1d6368551e85cac41df6df4234d865918b693319.zip gcc-1d6368551e85cac41df6df4234d865918b693319.tar.gz gcc-1d6368551e85cac41df6df4234d865918b693319.tar.bz2 |
re PR fortran/54370 (error: non-trivial conversion in unary operation)
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/54370
* trans-stmt.c (gfc_trans_do_while): Don't change the logical
kind for negation of the condition.
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/54370
* gfortran.dg/do_5.f90: New.
From-SVN: r190709
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-stmt.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 4d50517..eff252c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2012-08-27 Tobias Burnus <burnus@net-b.de> + PR fortran/54370 + * trans-stmt.c (gfc_trans_do_while): Don't change the logical + kind for negation of the condition. + +2012-08-27 Tobias Burnus <burnus@net-b.de> + * options.c (set_Wall): Don't set for -Wcompare-reals. * invoke.texi (-Wall, -Wcompare-reals): -Wall no longer implies -Wcompare-reals. diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 9467601..8bc4916 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -1785,7 +1785,7 @@ gfc_trans_do_while (gfc_code * code) gfc_conv_expr_val (&cond, code->expr1); gfc_add_block_to_block (&block, &cond.pre); cond.expr = fold_build1_loc (code->expr1->where.lb->location, - TRUTH_NOT_EXPR, boolean_type_node, cond.expr); + TRUTH_NOT_EXPR, TREE_TYPE (cond.expr), cond.expr); /* Build "IF (! cond) GOTO exit_label". */ tmp = build1_v (GOTO_EXPR, exit_label); |