re PR fortran/34549 (cshifting by a real value)
2007-12-22 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/34549 * check.c (gfc_check_cshift): Add check that shift is type INTEGER. 2007-12-22 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/34549 * cshift_shift_real_1.f90: New test. From-SVN: r131136
This commit is contained in:
parent
a507baad28
commit
62ee27a469
@ -1,3 +1,9 @@
|
||||
2007-12-22 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/34549
|
||||
* check.c (gfc_check_cshift): Add check that shift is
|
||||
type INTEGER.
|
||||
|
||||
2007-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/34540
|
||||
|
@ -853,6 +853,9 @@ gfc_check_cshift (gfc_expr *array, gfc_expr *shift, gfc_expr *dim)
|
||||
if (array_check (array, 0) == FAILURE)
|
||||
return FAILURE;
|
||||
|
||||
if (type_check (shift, 1, BT_INTEGER) == FAILURE)
|
||||
return FAILURE;
|
||||
|
||||
if (array->rank == 1)
|
||||
{
|
||||
if (scalar_check (shift, 1) == FAILURE)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-12-22 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/34549
|
||||
* cshift_shift_real_1.f90: New test.
|
||||
|
||||
2007-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/34540
|
||||
|
8
gcc/testsuite/gfortran.dg/cshift_shift_real_1.f90
Normal file
8
gcc/testsuite/gfortran.dg/cshift_shift_real_1.f90
Normal file
@ -0,0 +1,8 @@
|
||||
! { dg-do compile }
|
||||
! PR 34549 - a real value was accepted for shift.
|
||||
program main
|
||||
implicit none
|
||||
real, dimension(2,2) :: r
|
||||
data r /1.0, 2.0, 3.0, 4.0/
|
||||
print *,cshift(r,shift=2.3,dim=1) ! { dg-error "must be INTEGER" }
|
||||
end program main
|
Loading…
Reference in New Issue
Block a user