Hi Dave,

> but the testcases don't seem to be conditionalized on this. Would the
> new tests fail if gcc is built against an insufficiently recent version
> of mpfr, and is/should there be some kind of dg-requires for this, so
> that the new tests gracefully are "UNSUPPORTED" on such configurations?

The test case is indeed conditionalized, though in a different manner than you
might expect. The condition depends on the version of MPFR we're using, and
unfortunately, I haven't found a predefined macro that indicates which MPFR
version GCC is linked against. I tried `gcc -E -dM - < /dev/null`, but didn't
find any relevant macros.

My current approach uses `__builtin_constant_p(acospi(0.5))`. If we're using a
newer MPFR version, acospi will be constant-folded, causing the condition to
evaluate to true and enabling the rest of the test. Otherwise, the condition
will be false, and the entire test case will be omitted.

Do you see any other parts of the patch that require further revision?

Thanks,
Yuao


Reply via email to