Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Delesley Hutchins
No problem. Will do. -DeLesley On Thu, Sep 29, 2011 at 2:44 PM, Diego Novillo wrote: > On 11-09-29 17:24 , Delesley Hutchins wrote: >> >> That seems much cleaner!  LGTM.  Are you submitting the patch?  I can >> submit the test case. > > I tested it on an unclean tree, sorry.  I'd rather leave

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Diego Novillo
On 11-09-29 17:24 , Delesley Hutchins wrote: That seems much cleaner! LGTM. Are you submitting the patch? I can submit the test case. I tested it on an unclean tree, sorry. I'd rather leave the testing and final submit to you. Thanks. Diego.

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Delesley Hutchins
That seems much cleaner! LGTM. Are you submitting the patch? I can submit the test case. -DeLesley On Thu, Sep 29, 2011 at 1:50 PM, Diego Novillo wrote: > On 11-09-29 15:19 , Delesley Hutchins wrote: > >> However, I'm not convinced that it will work in all cases.  I wish I >> could come up

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Diego Novillo
On 11-09-29 15:19 , Delesley Hutchins wrote: However, I'm not convinced that it will work in all cases. I wish I could come up with a test case, but like I said, I don't understand enough about clones to understand what's happening here. If you are confident that DECL_CLONED_FUNCTION_P is corr

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Delesley Hutchins
The ICE occurs when decl is a TEMPLATE_DECL; that's the corner case that causes a problem. The patch that you and Ollie suggest does stop the ICE for our particular example; I assume because the template in question is not a clone, and so the predicate fails further on. However, I'm not convinced

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Diego Novillo
On 11-09-29 13:21 , Delesley Hutchins wrote: I don't have a test case, but look at the definitions of the two macros in cp/cp-tree.h. DECL_CLONED_FUNCTION_P calls decl_cloned_function_p, passing true as the second argument, while DECL_CLONED_FUNCTION makes the same call, but passes false. Now l

[PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Delesley Hutchins
I don't have a test case, but look at the definitions of the two macros in cp/cp-tree.h. DECL_CLONED_FUNCTION_P calls decl_cloned_function_p, passing true as the second argument,  while DECL_CLONED_FUNCTION makes the same call, but passes false.  Now look at the definition of  decl_cloned_function_

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Diego Novillo
On Thu, Sep 29, 2011 at 11:26, Ollie Wild wrote: > On Thu, Sep 29, 2011 at 10:13 AM, Delesley Hutchins > 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 >

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Ollie Wild
On Thu, Sep 29, 2011 at 10:13 AM, Delesley Hutchins 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

Re: [PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-29 Thread Ollie Wild
I think what you're looking for is: if (DECL_CLONED_FUNCTION_P (clone) && DECL_CLONED_FUNCTION (clone) == decl) That's a much cleaner implementation. Ollie On Tue, Sep 27, 2011 at 6:18 PM, Delesley Hutchins wrote: > > This patch fixes a bug in the parser which cause an internal compiler > erro

[PATCH] [Annotalysis] Fix internal compiler error on template methods

2011-09-27 Thread Delesley Hutchins
This patch fixes a bug in the parser which cause an internal compiler error when copying attributes from cloned methods. The bug occurs when a class has both an annotated constructor and a template method. Bootstrapped and passed gcc regression testsuite on x86_64-unknown-linux-gnu. Okay for goo