[LLVMdev] type-system-rewrite branch landing tomorrow

Jin Gu Kang jaykang10 at imrc.kist.re.kr
Mon Jul 11 23:20:23 PDT 2011


>> struct T {
>>  struct T (*p)(void);
>> } t;
>
> This testcase also generates infinite recursion when we use llvm-gcc for arm-target.
>
> Because return type of function pointer p's is struct type T which has one element,
> llvm-gcc for arm target calls a function which tries to chang aggregate return type
> to inner element.
> (For example, C.HandleAggregateResultAsScalar(Ty);
>  --> DefaultABI::HandleReturnType() function gcc/llvm-abi-default.cpp)
>
> In this case, infinite recursion is generated.
>
> So I made a patch.
> when function's return type is struct type and this struct type includes only
> function's pointer type as element, funtion's return type is not struct type's element
> and is struct type in this patch.
> and this patch inserts redundant GetLLVMType() function to remove duplicate
> StructsDeferred.push_back().
>
> What do you think about this patch?
>
> Please review this patch.
>
> Thanks,
> Jin-Gu Kang

I think this error have to be fixed.
This error can be generated on some of architectures.

Thanks,
Jin-Gu Kang



More information about the llvm-dev mailing list