Debian Codegraph @

gcc/testsuite/gfortran.dg/g77/970125-0.f

raw
1 c { dg-do compile }
2 c
3 c { dg-additional-options "-w" }
4 c
5 C JCB comments:
6 C g77 doesn't accept the added line "integer(kind=7) ..." --
7 C it crashes!
8 C
9 C It's questionable that g77 DTRT with regarding to passing
10 C %LOC() as an argument (thus by reference) and the new global
11 C analysis. I need to look into that further; my feeling is that
12 C passing %LOC() as an argument should be treated like passing an
13 C INTEGER(KIND=7) by reference, and no more specially than that
14 C (and that INTEGER(KIND=7) should be permitted as equivalent to
15 C INTEGER(KIND=1), INTEGER(KIND=2), or whatever, depending on the
16 C system's pointer size).
17 C
18 C The back end *still* has a bug here, which should be fixed,
19 C because, currently, what g77 is passing to it is, IMO, correct.
20
21 C No options:
22 C ../../egcs/gcc/f/info.c:259: failed assertion `ffeinfo_types_[basictype][kindtype] != NULL'
23 C -fno-globals -O:
24 C ../../egcs/gcc/expr.c:7291: Internal compiler error in function expand_expr
25
26 c Frontend bug fixed by JCB 1998-06-01 com.c &c changes.
27
28 integer i4
29 integer(kind=8) i8
30 integer(kind=8) max4
31 data max4/2147483647/
32 i4 = %loc(i4)
33 i8 = %loc(i8)
34 print *, max4
35 print *, i4, %loc(i4)
36 print *, i8, %loc(i8)
37 call foo(i4, %loc(i4), i8, %loc(i8)) ! { dg-error "Type mismatch in argument 'i8a' at .1.; passed INTEGER.8. to INTEGER.4." }
38 end
39 subroutine foo(i4, i4a, i8, i8a)
40 integer(kind=7) i4a, i8a ! { dg-error "Kind 7 not supported for type INTEGER" }
41 integer(kind=8) i8
42 print *, i4, i4a
43 print *, i8, i8a
44 end