public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* g77 and valgrind error?
@ 2004-08-06 20:43 bvds
  2004-08-06 20:57 ` Anyone knowlegable about valgrind ? Was: " Toon Moene
  0 siblings, 1 reply; 5+ messages in thread
From: bvds @ 2004-08-06 20:43 UTC (permalink / raw)
  To: gcc-help; +Cc: bvds


I am using valgrind on a g77 program and am getting
some peculiar results:

Cccccccccccccccccccccccccccccccccccccccccc
      program memty
      integer i
      i=360
      call fsub(i)
      end
C
      subroutine fsub(i)
      integer i
      double complex x(i,i)
      x(i,i)=complex(0D0,0D0)
      end
Ccccccccccccccccccccccccccccccccccccccccc

Valgrind gives an error of the form:

==12420== Invalid write of size 8
==12420==    at 0x8048671: fsub_ (memty.f:10)
==12420==    by 0x80486C5: main (../../../../gcc-3.1/libf2c/libF77/main.c:61)
==12420==  Address 0x52BFE8A0 is on thread 1's stack
==12420==
==12420== Invalid write of size 8
==12420==    at 0x8048679: fsub_ (memty.f:10)
==12420==    by 0x80486C5: main (../../../../gcc-3.1/libf2c/libF77/main.c:61)
==12420==  Address 0x52BFE8A8 is on thread 1's stack

Some more info:

bvds> uname -a
Linux bvds 2.4.25 #1 SMP Sat Mar 20 15:34:02 EST 2004 i686 i686 i386 GNU/Linux
bvds> g77 --version
GNU Fortran (GCC) 3.3.2
bvds> valgrind  --version
valgrind-2.1.2

I see the same behavior in valgrind-2.0.0.
This only happens for complex arrays.
if I use the g77 flag -femulate-complex, then there is one error.
(I have also sent this to the valgrind mailing list.)

Any ideas?

Brett van de Sande

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-08-07 11:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-06 20:43 g77 and valgrind error? bvds
2004-08-06 20:57 ` Anyone knowlegable about valgrind ? Was: " Toon Moene
2004-08-06 22:35   ` bvds
2004-08-06 22:40     ` Toon Moene
2004-08-08 17:49       ` bvds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).