On Tue, Mar 30, 2021 at 12:59:16PM +0200, Richard Biener wrote:
> > > > So yes, a better solution would be nice but I can't see any since the
> > > > underlying issue is known since a long time and thus the pragmatic
> > > > solution is the best (IMHO), also from a QOI perspective. For
> > > > intrinsics
> > > > it also avoids differences with -O0 vs -O with what we accept and
> > > > reject.
> > >
> > > Here is a simple patch for GCC 11 by defining __rdtsc and __rdtscp
> > > as macros. OK for master?
> >
> > I don't want to step on anyone's toes by approving this approach, so
> > I'd like to ask Richard and Jakub if they agree with the solution.
>
> I'm OK with the solution for __rdtsc & friends.
Ok for me too (temporarily until we have a fix for the general problem).
> I suppose there's nothing that guarantees taking the address of an intrinsic
> is going to work?
I bet one gets tons of different errors that way. After all, for -O0 a lot
of intrinsics are macros. And, for those that are inline functions, a lot
of them will be rejected if an immediate argument doesn't have a constant
value.
Jakub