On 2018.01.12 at 09:07 +0100, Markus Trippelsdorf wrote:
> On 2018.01.11 at 18:21 -0500, David Malcolm wrote:
> > diff --git a/gcc/testsuite/g++.dg/wrappers/pr83799.C
> > b/gcc/testsuite/g++.dg/wrappers/pr83799.C
> > new file mode 100644
> > index 0000000..f93c0ae
> > --- /dev/null
> > +++ b/gcc/testsuite/g++.dg/wrappers/pr83799.C
> > @@ -0,0 +1,18 @@
> > +class DataLayout;
> > +class TargetLoweringBase {
> > + void getTypeLegalizationCost(const DataLayout &DL) const;
> > +};
> > +class TargetTransformInfoImplBase {
> > + const DataLayout &DL; // this line isn't actually needed to reproduce
> > the issue
> > +};
> > +template <typename T>
> > +class TargetTransformInfoImplCRTPBase : public TargetTransformInfoImplBase
> > {};
> > +template <typename T>
> > +class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
> > + const TargetLoweringBase *getTLI() const;
> > + using TargetTransformInfoImplBase::DL;
> > + void getArithmeticInstrCost() {
> > + const TargetLoweringBase *TLI = getTLI();
> > + TLI->getTypeLegalizationCost(DL);
> > + }
> > +};
>
> Thanks for the fix. Minor nit:
> Please make TargetLoweringBase and TargetLoweringBase a struct instead
TargetTransformInfoImplBase
--
Markus