This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mudflap problem
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Herman ten Brugge <hermantenbrugge at home dot nl>
- Cc: gcc at gcc dot gnu dot org
- Date: 28 Sep 2004 17:07:53 -0400
- Subject: Re: mudflap problem
- References: <4159BBC2.8010504@home.nl>
Herman ten Brugge <hermantenbrugge@home.nl> writes:
> I tried mudflap on some test programs and found that the following
> program works:
> [...]
> When compiled with -fmudflap the code runs with no error. In the memory map
> the array b is before array a. So the code above first fills array b
> with 0 and then a.
This should not be happening, unless some intermediate compiler pass
is lowering the ARRAY_REF (b[i]) to a plain INDIRECT_REF (* b+i) type
expression. (If so, the instrumentation loses its limited awareness
of where the pointer value came from, and checks only that it refers
to *some* valid object.) This sort of lowering transform should
likely be disabled in the -fmudflap case. (It's possible that there
is a bug elsewhere instead.)
- FChE