This is the mail archive of the gcc-patches@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: [PATCH] [Annotalysis] Fix internal compiler error on template methods


On Thu, Sep 29, 2011 at 11:26, Ollie Wild <aaw@google.com> wrote:
> On Thu, Sep 29, 2011 at 10:13 AM, Delesley Hutchins <delesley@google.com> wrote:
>>
>> Unfortunately, DECL_CLONED_FUNCTION_P is not actually a predicate that allows you
>> to call DECL_CLONED_FUNCTION safely. ÂLook at the definition of the macros; despite
>> what the comments say, DECL_CLONED_FUNCTION_P may return true in cases where
>> DECL_CLONED_FUNCTION will still crash. ÂThe correct fix is to fix the macros, but I
>> have no understanding of what they are actually doing. Â:-(
>> Â -DeLesley
>
> Diego, can you comment?

Really?  That's surprising.  I would certainly expect
DECL_CLONED_FUNCTION_P to be exactly the right predicate to guard
DECL_CLONED_FUNCTION with.  That's how it's used elsewhere.

Delesley, can you give more details on when DECL_CLONED_FUNCTION_P
fails?  Changing that predicate with:

              if (DECL_CLONED_FUNCTION_P (clone)
                  && DECL_CLONED_FUNCTION (clone) == decl)

should be all you need.  If that's not working, then send me the test
case, cause I'll be confused :)


Diego.


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