[PATCH] Fix PR C++/18984

Andrew Pinski pinskia@physics.uc.edu
Tue Dec 14 15:41:00 GMT 2004


On Dec 14, 2004, at 10:37 AM, Andrew Pinski wrote:

> The problem here is that I had mis read the original code when 
> converting
> to use pointer-sets instead of hash tables in cp-gimplify.c.  This 
> patch
> fixes that error and fixes the ICE.
>
> OK? Bootstrapped and tested on powerpc-darwin with no regressions.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> 	* pointer-set.c (pointer_set_contains): Add back.
> 	* pointer-set.h (pointer_set_contains): Add back.
> cp/ChangeLog:
> 	* cp-gimplify.c (cp_genericize_r): Don't insert first but instead
> 	check to see if contains the pointer.  Insert the statement before
> 	returning.

I had forgot to attach the testcase, sorry about that.
Testcase:
struct Str
{
     Str(const char *chars);
     Str& operator=(const char *chars);
     virtual operator char*() const;
};
Str _localName(Str fullname)
{
   return (char*)fullname;
}


-- Pinski



More information about the Gcc-patches mailing list