diff options
| author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-24 19:18:27 +0000 |
|---|---|---|
| committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-24 19:18:27 +0000 |
| commit | 59ef97a304f40f1b4da4e9879e471d422e6c0bd0 (patch) | |
| tree | f3ffea23f2672d149b7fa56d5dd83a243c975e9b /gcc/fortran/simplify.c | |
| parent | f2fc1331d0c83a5040b3285692d2ab046d1181b0 (diff) | |
| download | ppe42-gcc-59ef97a304f40f1b4da4e9879e471d422e6c0bd0.tar.gz ppe42-gcc-59ef97a304f40f1b4da4e9879e471d422e6c0bd0.zip | |
2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/35223
* simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
(gfc_simplify_ibset): Remove call to range_check.
(simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
(gfc_simplify_real): Add call gfc_clear_ts to initialize the
temporary gfc_typspec variable.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132597 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/simplify.c')
| -rw-r--r-- | gcc/fortran/simplify.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 1b5b23e2c0f..77af04d4c45 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -779,6 +779,7 @@ simplify_cmplx (const char *name, gfc_expr *x, gfc_expr *y, int kind) if (x->is_boz) { gfc_typespec ts; + gfc_clear_ts (&ts); ts.kind = result->ts.kind; ts.type = BT_REAL; if (!gfc_convert_boz (x, &ts)) @@ -789,6 +790,7 @@ simplify_cmplx (const char *name, gfc_expr *x, gfc_expr *y, int kind) if (y && y->is_boz) { gfc_typespec ts; + gfc_clear_ts (&ts); ts.kind = result->ts.kind; ts.type = BT_REAL; if (!gfc_convert_boz (y, &ts)) @@ -960,6 +962,7 @@ gfc_simplify_dble (gfc_expr *e) if (e->ts.type == BT_INTEGER && e->is_boz) { gfc_typespec ts; + gfc_clear_ts (&ts); ts.type = BT_REAL; ts.kind = gfc_default_double_kind; result = gfc_copy_expr (e); @@ -1148,6 +1151,7 @@ gfc_simplify_float (gfc_expr *a) if (a->is_boz) { gfc_typespec ts; + gfc_clear_ts (&ts); ts.type = BT_REAL; ts.kind = gfc_default_real_kind; @@ -1359,7 +1363,7 @@ gfc_simplify_ibclr (gfc_expr *x, gfc_expr *y) convert_mpz_to_signed (result->value.integer, gfc_integer_kinds[k].bit_size); - return range_check (result, "IBCLR"); + return result; } @@ -1400,6 +1404,8 @@ gfc_simplify_ibits (gfc_expr *x, gfc_expr *y, gfc_expr *z) } result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where); + convert_mpz_to_unsigned (result->value.integer, + gfc_integer_kinds[k].bit_size); bits = gfc_getmem (bitsize * sizeof (int)); @@ -1421,7 +1427,10 @@ gfc_simplify_ibits (gfc_expr *x, gfc_expr *y, gfc_expr *z) gfc_free (bits); - return range_check (result, "IBITS"); + convert_mpz_to_signed (result->value.integer, + gfc_integer_kinds[k].bit_size); + + return result; } @@ -1459,7 +1468,7 @@ gfc_simplify_ibset (gfc_expr *x, gfc_expr *y) convert_mpz_to_signed (result->value.integer, gfc_integer_kinds[k].bit_size); - return range_check (result, "IBSET"); + return result; } @@ -3020,6 +3029,7 @@ gfc_simplify_real (gfc_expr *e, gfc_expr *k) if (e->ts.type == BT_INTEGER && e->is_boz) { gfc_typespec ts; + gfc_clear_ts (&ts); ts.type = BT_REAL; ts.kind = kind; result = gfc_copy_expr (e); |

