[llvm-commits] [llvm-gcc-4.2] r49017 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h config/i386/llvm-i386.cpp config/rs6000/llvm-rs6000.cpp config/rs6000/rs6000.h llvm-abi.h

Devang Patel dpatel at apple.com
Thu Apr 3 09:49:16 PDT 2008


On Apr 1, 2008, at 2:18 AM, Duncan Sands wrote:

>> +// isAggregateFunctionParam - Return true if the specified GCC type
>> +// satisfies function.c:aggregate_value_p()
>> +static bool isAggregateFunctionParam(tree type) {
>> +  if (TYPE_SIZE(type) && TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST
>> +      && !aggregate_value_p(type, current_function_decl))
>
> Use of current_function_decl is bogus because the ABI logic is also
> used when calling a function, in which case it is the declaration of
> the callee that you need here!  I understand that this is not your
> fault: the bug was already present in the original code.  But since  
> you
> seem to be working on this stuff, maybe you could fix this while  
> there.

good catch. In general, current function handling could use  
clarification and simplification during llvm conversion, but for now I  
addressed this particular case.

-
Devang



More information about the llvm-commits mailing list