Commit da9ad923 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/34425 (bogus warning)

2007-12-10  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34425
        * interface.c (get_expr_storage_size): Use signed integer when
        obtaining the bounds.

2007-12-10  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34425
        * gfortran.dg/argument_checking_10.f90: New.

From-SVN: r130752
parent c8305c98
2007-12-10 Tobias Burnus <burnus@net-b.de>
PR fortran/34425
* interface.c (get_expr_storage_size): Use signed integer when
obtaining the bounds.
2007-12-09 Jakub Jelinek <jakub@redhat.com>
PR fortran/22244
......
......@@ -1642,8 +1642,8 @@ get_expr_storage_size (gfc_expr *e)
if (ref->u.ar.as->lower[i] && ref->u.ar.as->upper[i]
&& ref->u.ar.as->lower[i]->expr_type == EXPR_CONSTANT
&& ref->u.ar.as->upper[i]->expr_type == EXPR_CONSTANT)
elements *= mpz_get_ui (ref->u.ar.as->upper[i]->value.integer)
- mpz_get_ui (ref->u.ar.as->lower[i]->value.integer)
elements *= mpz_get_si (ref->u.ar.as->upper[i]->value.integer)
- mpz_get_si (ref->u.ar.as->lower[i]->value.integer)
+ 1L;
else
return 0;
......
2007-12-10 Tobias Burnus <burnus@net-b.de>
PR fortran/34425
* gfortran.dg/argument_checking_10.f90: New.
2007-12-10 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/34302
! { dg-do compile }
!
! PR fortran/34425
!
! Contributed by Joost VandeVondele
!
IMPLICIT NONE
INTEGER :: i(-1:1)
INTEGER :: j(-2:-1)
CALL S(i)
CALL S(j) ! { dg-warning "Actual argument contains too few elements for dummy argument 'i' .2/3." }
CONTAINS
SUBROUTINE S(i)
INTEGER :: i(0:2)
END SUBROUTINE
END
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment