[BUG] g77 bug

Won Kyu Park wkpark@chem.skku.ac.kr
Mon Dec 28 20:39:00 GMT 1998


I think...

G77 does not support 64-bit array reference indexing(?) yet.

Attatched file is a simple show case. (imported from XXX(?) package )

        implicit real*8(a-g,o-z)
        integer*8 off,of
        dimension v(1)
        call myalloc(v,off)
	     ^^^^^^^
		off has a 64bit value in Alpha machine.

        write(*,*)'off =',off
	           ^^^^^^^^^^ 
        call adr(v(off),off)
             ^^^^ adr() is a C program.
        return
        end

This is a output. (compiled by g77)

      offset= 274273939604 --+
       off = 274273939604 ------> output by main()
      address = 98312, off= 274273939604 -----> output by adr()
                ^^^^^
                   ---> incorrect address
This is a another output by fort77(f2c)

      offset= 274273801716
       off = 274273801716
      address = 2199023353864, off= 274273801716
                ^^^^^^^^^^^^^---> correct !!!
What's wrong in g77 ?

--
Won Kyu Park <wkpark@chem.skku.ac.kr>
test.shar

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.shar
Type: application/octet-stream
Size: 7544 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19981228/c1aeee74/attachment.obj>


More information about the Gcc-bugs mailing list