Commit 74c177cb by Thomas Koenig

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
parent d8538159
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> 2007-11-20 Richard Sandiford <rsandifo@nildram.co.uk>
* lib/target-supports.exp (check_effective_target_mips_soft_float): * lib/target-supports.exp (check_effective_target_mips_soft_float):
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
! PR 30981 - this used to go into an endless loop during execution. ! PR 30981 - this used to go into an endless loop during execution.
program test program test
a = 3.0 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 end program test
...@@ -22,10 +22,11 @@ subroutine run_me(a, i, z) ...@@ -22,10 +22,11 @@ subroutine run_me(a, i, z)
call check_equal_i (i**2, i*i) call check_equal_i (i**2, i*i)
call check_equal_i (i**3, i*(i**2)) call check_equal_i (i**3, i*(i**2))
call check_equal_i (int(i**0_8,kind=4), 1) ! i has default integer kind.
call check_equal_i (int(i**1_8,kind=4), i) call check_equal_i (int(i**0_8,kind=kind(i)), 1)
call check_equal_i (int(i**2_8,kind=4), i*i) call check_equal_i (int(i**1_8,kind=kind(i)), i)
call check_equal_i (int(i**3_8,kind=4), i*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**0.0, 1.0)
call check_equal_r (a**1.0, a) call check_equal_r (a**1.0, a)
......
...@@ -82,9 +82,9 @@ program test ...@@ -82,9 +82,9 @@ program test
TEST(1_8,0_8,i8) TEST(1_8,0_8,i8)
TEST(-1,0,i4) TEST(-1,0,i4)
TEST(-1_8,0_8,i8) 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_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(-huge(0_8)-1_8,0_8,i8)
TEST(1,1,i4) TEST(1,1,i4)
...@@ -164,7 +164,7 @@ program test ...@@ -164,7 +164,7 @@ program test
TEST(2.0,-3_8,r4) TEST(2.0,-3_8,r4)
TEST(nearest(1.0,-1.0),0,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,-1.0),0_8,r4)
TEST(nearest(1.0_8,-1.0),huge(0_8),r8) ! { dg-warning "Arithmetic underflow" } TEST(nearest(1.0_8,-1.0),huge(0_8),r8) ! { dg-warning "Arithmetic underflow" }
......
...@@ -65,7 +65,7 @@ program test ...@@ -65,7 +65,7 @@ program test
TEST(3_8,43_8,i8) TEST(3_8,43_8,i8)
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 !!!!! !!!!! REAL BASE !!!!!
TEST(0.0,-1,r4) TEST(0.0,-1,r4)
......
! { dg-do compile } ! { dg-do compile }
! PR fortran/23912 ! PR fortran/23912
integer i4 integer(kind=4) i4
integer(kind=8) i8 integer(kind=8) i8
i4 = modulo(i4,i8) ! { dg-warning "Extension" } i4 = modulo(i4,i8) ! { dg-warning "Extension" }
......
...@@ -3,36 +3,36 @@ ...@@ -3,36 +3,36 @@
program main program main
implicit none implicit none
integer :: i1, i2, i3 integer(kind=4) :: i1, i2, i3
open(15,form="UNFORMATTED") open(15,form="UNFORMATTED")
write (15) 1 write (15) 1_4
close (15) close (15)
open (15,form="UNFORMATTED",access="DIRECT",recl=4) open (15,form="UNFORMATTED",access="DIRECT",recl=4)
i1 = 1 i1 = 1_4
i2 = 2 i2 = 2_4
i3 = 3 i3 = 3_4
read (15,rec=1) i1 read (15,rec=1) i1
read (15,rec=2) i2 read (15,rec=2) i2
read (15,rec=3) i3 read (15,rec=3) i3
close (15, status="DELETE") close (15, status="DELETE")
if (i1 /= 4) call abort if (i1 /= 4_4) call abort
if (i2 /= 1) call abort if (i2 /= 1_4) call abort
if (i3 /= 4) call abort if (i3 /= 4_4) call abort
open(15,form="UNFORMATTED",convert="SWAP") open(15,form="UNFORMATTED",convert="SWAP")
write (15) 1 write (15) 1_4
close (15) close (15)
open (15,form="UNFORMATTED",access="DIRECT",convert="SWAP",recl=4) open (15,form="UNFORMATTED",access="DIRECT",convert="SWAP",recl=4)
i1 = 1 i1 = 1_4
i2 = 2 i2 = 2_4
i3 = 3 i3 = 3_4
read (15,rec=1) i1 read (15,rec=1) i1
read (15,rec=2) i2 read (15,rec=2) i2
read (15,rec=3) i3 read (15,rec=3) i3
close(15,status="DELETE") close(15,status="DELETE")
if (i1 /= 4) call abort if (i1 /= 4_4) call abort
if (i2 /= 1) call abort if (i2 /= 1_4) call abort
if (i3 /= 4) call abort if (i3 /= 4_4) call abort
end program main end program main
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