Re: valreg at calls.c is 0 at a moment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 3, 2009 at 1:28 AM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> "Kim, Eunchan" <helpbygrace@xxxxxxxxx> writes:
>
>> So, the error occurs at calls.c:2880. which code is..
>>
>>>>----------
>>       if (pass && (flags & ECF_LIBCALL_BLOCK))
>> +---- 60 : {---------------------------------------------------------------------
>>       else if (pass && (flags & ECF_MALLOC))
>>     {
>>       rtx temp = gen_reg_rtx (GET_MODE (valreg));
>>       rtx last, insns;
>> ----------<<
>>
>> at this statement, valreg was 0 when i printed that value. i wondered
>> why valreg is 0. most assignment of valreg is determined by
>> structure_value_addr, which is non-zero at this time. It means that
>> 'malloc' returns BLKmode value. isn't it?
>
> valreg certainly shouldn't be zero either.  But malloc does not return
> a BLKmode value; it returns a Pmode value.  You mention
> structure_value_addr but you don't say whether it is non-NULL.
> Certainly structure_value_addr should be NULL for a call to malloc, as
> malloc does not return a structure.  If structure_value_addr is not
> NULL, that implies that aggregate_value_p returned true for a call to
> malloc, and I don't see how that could happen.
>
> Ian
>

when valreg was zero, structure_value_addr was not NULL. It pointed
certain memory address(pointer). It means that
aggregate_value_p(exp,fndecl) is true, and target or MEM_P(target) or
CALL_EXPR_RETURN_SLOT_OPT(exp) is not true.

I have a question. what exactly aggregate_value_p(exp, fndecl) means?
so, if aggregate_value_p is not true. May this problem be solved?

-- Eunchan


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux