Copy files from g77.f-torture/compile.

2004-07-13  David Billinghurst (David.Billinghurst@riotinto.com)

	Copy files from g77.f-torture/compile.
	Add "{ dg-do compile}".  Other changes as noted
	* gfortran.dg/g77/19990905-0.f: XFAIL PR 16511
	* gfortran.dg/g77/20010519-1.f: Add dg-warning as required
	* gfortran.dg/g77/20030115-1.f: Add dg-warning as required
	* gfortran.dg/g77/20030326-1.f: XFAIL PR 16511
	* gfortran.dg/g77/970125-0.f: Add dg-excess-errors.
	* gfortran.dg/g77/980519-2.f: Declare hd_S,hd_Z,hd_T
	* gfortran.dg/g77/990115-1.f: Declare RANK as INTEGER
	* gfortran.dg/g77/alpha1.f: Separate declaration and DATA
	statement to conform to standard.  Append alpha1.x for reference.
	* gfortran.dg/g77/xformat.f: Add dg-warning

From-SVN: r84605
This commit is contained in:
David Billinghurst 2004-07-13 07:08:22 +00:00 committed by David Billinghurst
parent ecb0ccbcbd
commit 29f1711877
10 changed files with 1521 additions and 0 deletions

View File

@ -1,3 +1,18 @@
2004-07-13 David Billinghurst (David.Billinghurst@riotinto.com)
Copy files from g77.f-torture/compile.
Add "{ dg-do compile}". Other changes as noted
* gfortran.dg/g77/19990905-0.f: XFAIL PR 16511
* gfortran.dg/g77/20010519-1.f: Add dg-warning as required
* gfortran.dg/g77/20030115-1.f: Add dg-warning as required
* gfortran.dg/g77/20030326-1.f: XFAIL PR 16511
* gfortran.dg/g77/970125-0.f: Add dg-excess-errors.
* gfortran.dg/g77/980519-2.f: Declare hd_S,hd_Z,hd_T
* gfortran.dg/g77/990115-1.f: Declare RANK as INTEGER
* gfortran.dg/g77/alpha1.f: Separate declaration and DATA
statement to conform to standard. Append alpha1.x for reference.
* gfortran.dg/g77/xformat.f: Add dg-warning
2004-07-13 David Billinghurst (David.Billinghurst@riotinto.com)
* gfortran.dg/g77/cpp.F: Copy from g77.f-torture/compile.

View File

@ -0,0 +1,8 @@
c { dg-do compile }
* =foo0.f in Burley's g77 test suite.
subroutine sub(a)
common /info/ iarray(1000)
equivalence (m,iarray(100)), (n,iarray(200))
real a(m,n) ! { dg-bogus "Variable 'm' cannot appear" "Variable 'm' cannot appear" { xfail *-*-* } } PR 16511
a(1,1) = a(2,2)
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
C { dg-do compile }
SUBROUTINE FOO (B)
10 CALL BAR(A)
ASSIGN 20 TO M ! { dg-warning "Obsolete: ASSIGN" "ASSIGN" }
IF(100.LT.A) GOTO 10
GOTO 40
C
20 IF(B.LT.ABS(A)) GOTO 10
ASSIGN 30 TO M ! { dg-warning "Obsolete: ASSIGN" "ASSIGN" }
GOTO 40
C
30 ASSIGN 10 TO M ! { dg-warning "Obsolete: ASSIGN" "ASSIGN" }
40 GOTO M,(10,20,30) ! { dg-warning "Obsolete: Assigned" "Assigned GO TO" }
END

View File

@ -0,0 +1,15 @@
C { dg-do compile }
C PR fortran/9793
C larson@w6yx.stanford.edu
C
integer a, b, c
c = -2147483648 / -1 ! { dg-bogus "Arithmetic overflow" "Arithmetic overflow" { xfail *-*-* } } PR 16512
a = 1
b = 0
c = a / b
print *, c
end

View File

@ -0,0 +1,45 @@
c { dg-do compile }
c
c Following line added on transfer to gfortran testsuite
c { dg-excess-errors "" }
c
C JCB comments:
C g77 doesn't accept the added line "integer(kind=7) ..." --
C it crashes!
C
C It's questionable that g77 DTRT with regarding to passing
C %LOC() as an argument (thus by reference) and the new global
C analysis. I need to look into that further; my feeling is that
C passing %LOC() as an argument should be treated like passing an
C INTEGER(KIND=7) by reference, and no more specially than that
C (and that INTEGER(KIND=7) should be permitted as equivalent to
C INTEGER(KIND=1), INTEGER(KIND=2), or whatever, depending on the
C system's pointer size).
C
C The back end *still* has a bug here, which should be fixed,
C because, currently, what g77 is passing to it is, IMO, correct.
C No options:
C ../../egcs/gcc/f/info.c:259: failed assertion `ffeinfo_types_[basictype][kindtype] != NULL'
C -fno-globals -O:
C ../../egcs/gcc/expr.c:7291: Internal compiler error in function expand_expr
c Frontend bug fixed by JCB 1998-06-01 com.c &c changes.
integer*4 i4
integer*8 i8
integer*8 max4
data max4/2147483647/
i4 = %loc(i4)
i8 = %loc(i8)
print *, max4
print *, i4, %loc(i4)
print *, i8, %loc(i8)
call foo(i4, %loc(i4), i8, %loc(i8))
end
subroutine foo(i4, i4a, i8, i8a)
integer(kind=7) i4a, i8a
integer*8 i8
print *, i4, i4a
print *, i8, i8a
end

View File

@ -0,0 +1,51 @@
c { dg-do compile }
* Date: Fri, 17 Apr 1998 14:12:51 +0200
* From: Jean-Paul Jeannot <jeannot@gx-tech.fr>
* Organization: GX Technology France
* To: egcs-bugs@cygnus.com
* Subject: identified bug in g77 on Alpha
*
* Dear Sir,
*
* You will find below the assembly code of a simple Fortran routine which
* crashes with segmentation fault when storing the first element
* in( jT_f-hd_T ) = Xsp
* whereas everything is fine when commenting this line.
*
* The assembly code (generated with
* -ffast-math -fexpensive-optimizations -fomit-frame-pointer -fno-inline
* or with -O5)
* uses a zapnot instruction to copy an address.
* BUT the zapnot parameter is 15 (copuing 4 bytes) instead of 255 (to copy
* 8 bytes).
*
* I guess this is typically a 64 bit issue. As, from my understanding,
* zapnots are used a lot to copy registers, this may create problems
* elsewhere.
*
* Thanks for your help
*
* Jean-Paul Jeannot
*
subroutine simul_trace( in, Xsp, Ysp, Xrcv, Yrcv )
c Next declaration added on transfer to gfortran testsuite
integer hd_S, hd_Z, hd_T
common /Idim/ jT_f, jT_l, nT, nT_dim
common /Idim/ jZ_f, jZ_l, nZ, nZ_dim
common /Idim/ jZ2_f, jZ2_l, nZ2, nZ2_dim
common /Idim/ jzs_f, jzs_l, nzs, nzs_dim, l_amp
common /Idim/ hd_S, hd_Z, hd_T
common /Idim/ nlay, nlayz
common /Idim/ n_work
common /Idim/ nb_calls
real Xsp, Ysp, Xrcv, Yrcv
real in( jT_f-hd_T : jT_l )
in( jT_f-hd_T ) = Xsp
in( jT_f-hd_T + 1 ) = Ysp
in( jT_f-hd_T + 2 ) = Xrcv
in( jT_f-hd_T + 3 ) = Yrcv
end

View File

@ -0,0 +1,12 @@
c { dg-do compile }
C Derived from lapack
SUBROUTINE ZGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
$ WORK, RWORK, INFO )
COMPLEX*16 WORK( * )
c Following declaration added on transfer to gfortran testsuite.
c It is present in original lapack source
integer rank
DO 20 I = 1, RANK
WORK( ISMAX+I-1 ) = S2*WORK( ISMAX+I-1 )
20 CONTINUE
END

View File

@ -0,0 +1,27 @@
c { dg-do compile }
REAL*8 A,B,C
REAL*4 RARRAY(19)
DATA RARRAY /19*-1/
INTEGER BOTTOM,RIGHT
INTEGER IARRAY(19)
DATA IARRAY /0,0,0,0,0,0,0,0,0,0,0,0,13,14,0,0,0,0,0/
EQUIVALENCE (RARRAY(13),BOTTOM),(RARRAY(14),RIGHT)
C
IF(I.NE.0) call exit(1)
C gcc: Internal compiler error: program f771 got fatal signal 11
C at this point!
END
! previously g77.ftorture/compile/alpha1.f with following alpha1.x
!
!# This test fails compilation in cross-endian environments, for example as
!# below, with a "sorry" message.
!
!if { [ishost "i\[34567\]86-*-*"] } {
! if { [istarget "mmix-knuth-mmixware"]
! || [istarget "powerpc-*-*"] } {
! set torture_compile_xfail [istarget]
! }
!}
!
!return 0

View File

@ -0,0 +1,4 @@
c { dg-do compile }
PRINT 10, 2, 3
10 FORMAT (I1, X, I1) ! { dg-warning "Extension: X descriptor" "Extension: X descriptor" }
END