OSDN Git Service

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