re PR fortran/32770 ([Meta-bug] -fdefault-integer-8 issues)

2007-11-20  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/32770
	* gfortran.dg/record_marker_1.f90:  Explicitly set kinds
	so test passes with -frecord-marker=8.
	* gfortran.dg/integer_exponentiation_1.f90:  Likewise.
	* gfortran.dg/integer_exponentiation_2.f90:  Likewise.
	* gfortran.dg/integer_exponentiation_3.F90:  Likewise.
	* gfortran.dg/integer_exponentiation_5.F90:  Likewise.
	* gfortrand.dg/modulo_1.f90:  Likewise.

From-SVN: r130322
This commit is contained in:
Thomas Koenig 2007-11-20 21:57:04 +00:00
parent d8538159f1
commit 74c177cbbd
7 changed files with 37 additions and 25 deletions

View File

@ -1,3 +1,14 @@
2007-11-20 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/32770
* gfortran.dg/record_marker_1.f90: Explicitly set kinds
so test passes with -frecord-marker=8.
* gfortran.dg/integer_exponentiation_1.f90: Likewise.
* gfortran.dg/integer_exponentiation_2.f90: Likewise.
* gfortran.dg/integer_exponentiation_3.F90: Likewise.
* gfortran.dg/integer_exponentiation_5.F90: Likewise.
* gfortrand.dg/modulo_1.f90: Likewise.
2007-11-20 Richard Sandiford <rsandifo@nildram.co.uk>
* lib/target-supports.exp (check_effective_target_mips_soft_float):

View File

@ -2,5 +2,5 @@
! PR 30981 - this used to go into an endless loop during execution.
program test
a = 3.0
b = a**(-2147483647-1) ! { dg-warning "Integer outside symmetric range" }
b = a**(-2147483647_4-1_4) ! { dg-warning "Integer outside symmetric range" }
end program test

View File

@ -22,10 +22,11 @@ subroutine run_me(a, i, z)
call check_equal_i (i**2, i*i)
call check_equal_i (i**3, i*(i**2))
call check_equal_i (int(i**0_8,kind=4), 1)
call check_equal_i (int(i**1_8,kind=4), i)
call check_equal_i (int(i**2_8,kind=4), i*i)
call check_equal_i (int(i**3_8,kind=4), i*i*i)
! i has default integer kind.
call check_equal_i (int(i**0_8,kind=kind(i)), 1)
call check_equal_i (int(i**1_8,kind=kind(i)), i)
call check_equal_i (int(i**2_8,kind=kind(i)), i*i)
call check_equal_i (int(i**3_8,kind=kind(i)), i*i*i)
call check_equal_r (a**0.0, 1.0)
call check_equal_r (a**1.0, a)

View File

@ -82,9 +82,9 @@ program test
TEST(1_8,0_8,i8)
TEST(-1,0,i4)
TEST(-1_8,0_8,i8)
TEST(huge(0),0,i4)
TEST(huge(0_4),0,i4)
TEST(huge(0_8),0_8,i8)
TEST(-huge(0)-1,0,i4)
TEST(-huge(0_4)-1,0,i4)
TEST(-huge(0_8)-1_8,0_8,i8)
TEST(1,1,i4)
@ -164,7 +164,7 @@ program test
TEST(2.0,-3_8,r4)
TEST(nearest(1.0,-1.0),0,r4)
TEST(nearest(1.0,-1.0),huge(0),r4) ! { dg-warning "Arithmetic underflow" }
TEST(nearest(1.0,-1.0),huge(0_4),r4) ! { dg-warning "Arithmetic underflow" }
TEST(nearest(1.0,-1.0),0_8,r4)
TEST(nearest(1.0_8,-1.0),huge(0_8),r8) ! { dg-warning "Arithmetic underflow" }

View File

@ -65,7 +65,7 @@ program test
TEST(3_8,43_8,i8)
TEST(-3_8,43_8,i8)
TEST(17_8,int(huge(0),kind=8)+1,i8)
TEST(17_8,int(huge(0_4),kind=8)+1,i8)
!!!!! REAL BASE !!!!!
TEST(0.0,-1,r4)

View File

@ -1,6 +1,6 @@
! { dg-do compile }
! PR fortran/23912
integer i4
integer(kind=4) i4
integer(kind=8) i8
i4 = modulo(i4,i8) ! { dg-warning "Extension" }

View File

@ -3,36 +3,36 @@
program main
implicit none
integer :: i1, i2, i3
integer(kind=4) :: i1, i2, i3
open(15,form="UNFORMATTED")
write (15) 1
write (15) 1_4
close (15)
open (15,form="UNFORMATTED",access="DIRECT",recl=4)
i1 = 1
i2 = 2
i3 = 3
i1 = 1_4
i2 = 2_4
i3 = 3_4
read (15,rec=1) i1
read (15,rec=2) i2
read (15,rec=3) i3
close (15, status="DELETE")
if (i1 /= 4) call abort
if (i2 /= 1) call abort
if (i3 /= 4) call abort
if (i1 /= 4_4) call abort
if (i2 /= 1_4) call abort
if (i3 /= 4_4) call abort
open(15,form="UNFORMATTED",convert="SWAP")
write (15) 1
write (15) 1_4
close (15)
open (15,form="UNFORMATTED",access="DIRECT",convert="SWAP",recl=4)
i1 = 1
i2 = 2
i3 = 3
i1 = 1_4
i2 = 2_4
i3 = 3_4
read (15,rec=1) i1
read (15,rec=2) i2
read (15,rec=3) i3
close(15,status="DELETE")
if (i1 /= 4) call abort
if (i2 /= 1) call abort
if (i3 /= 4) call abort
if (i1 /= 4_4) call abort
if (i2 /= 1_4) call abort
if (i3 /= 4_4) call abort
end program main