This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 4.3.2 bug (was: Illegal subtraction in tmp-dive_1.s)?


On 2009-04-20 10:04:00 -0400, Joern Rennecke wrote:
>> As the bug occurs only when malloc is in the tested function,
>
> Note that gcc 'knows' that memory obtained by malloc does not
> alias other memory.

Yes, in the case of GMP, this was a GMP internal function, not malloc,
but this function is declared with __attribute__ ((malloc)), and the
bug disappears if I remove this attribute. I noticed that when I tried
to simplify the testcase.

> You can use a differently named wrapper function for malloc,
> or use the malloc attribute for another function, to experiment
> how this affects code generation.

I did a test with a wrapper function my_malloc (that just calls
malloc and returns its value), but the bug was still visible,
perhaps due to optimization.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]