On Fri, 3 Jan 2014, Jakub Jelinek wrote: > On Fri, Jan 03, 2014 at 10:26:44AM +0100, Richard Biener wrote: > > Jakub Jelinek <ja...@redhat.com> wrote: > > >On Tue, Dec 31, 2013 at 11:30:12AM +0100, Richard Biener wrote: > > >> Meanwhile your patch is ok. > > > > > >As discussed in the PR, the patch wasn't sufficient, __cxa_pure_virtual > > >can appear in the vtable and it has pretty much the same properties > > >as __builtin_unreachable (void return value, no arguments, noreturn, > > >DCE or cfg cleanup being able to remove anything after it because of > > >noreturn). > > > > > >Additionally, the patch attempts to punt on invalid type changes > > >(ODR violations?, apparently none appear during bootstrap/regtest as > > >verified by additional logging added there) or inplace changes of > > >gimple_call_flags that would require some cleanups caller isn't > > >expected to > > >do (again, doesn't happen during bootstrap/regtest). > > > > > >Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > > > I'd rather do nothing in the !inplace case, it's rare enough to not care. > > Ok. > > > Also there is nothing wrong with wrong types et al - we have a perfect > > mechanism for dealing with this. Change the fndecl but not the fntype. > > Well, see PR59630. The question is if having to handle it everywhere > is worth it.
Well, this case happens because we go back to GENERIC which doesn't have this feature. So "everywhere" is somewhat a broad stmt. It's easy to guard the builtins.c folding with a compatibility check of fntype and fndecl type. Richard.