On 24 Oct 23:55, Jeff Law wrote: > On 10/21/13 06:10, Ilya Enkovich wrote: > >Hi, > > > >This patch introduces two new contructor types supported by > >cgraph_build_static_cdtor. > > > >'B' type is used to initialize static objects (bounds) created by Pointers > >Checker. The difference of this type from the regular constructor is that > >'B' constructor is never instrumented by Pointers Checker. > > > >'P' type is used by Pointers Checker to generate constructors to initialize > >bounds of statically initialized pointers. Pointers Checker remove all > >stores from such constructors after instrumentation. > > > >Since 'P' type constructors are created for statically initialized objects, > >we need to avoid creation of such objects during its gimplification. New > >restriction was added to gimplify_init_constructor. > > > >Bootstrapped and checked on linux-x86_64. > > > >Thanks, > >Ilya > >-- > > > >gcc/ > > > >2013-10-21 Ilya Enkovich <ilya.enkov...@intel.com> > > > > * ipa.c (cgraph_build_static_cdtor_1): Support contructors > > with "chkp ctor" and "bnd_legacy" attributes. > > * gimplify.c (gimplify_init_constructor): Avoid infinite > > loop during gimplification of bounds initializer. > This is OK. > > As a side note, it seems awfully strange to be passing in the type > of ctor/dtor in a char varaible. I'd look favorably upon changing > that to an enum where the enum values describe the cases they > handle. The existing code seems so, umm, 80s/90s style. Obviously > not something that's required of you to move this patch forward.
Thanks! Installed to trunk. Ilya > > jeff >