On 10/9/20 4:48 AM, Jakub Jelinek wrote:
On Tue, Oct 06, 2020 at 03:40:52PM -0400, Jason Merrill via Gcc-patches wrote:
On 10/4/20 11:28 PM, Patrick Palka wrote:
cp_tree_equal currently considers alignof the same as __alignof__, but
these operators are semantically different ever since r8-7957. In the
testcase below, this causes the second static_assert to fail on targets
where alignof(double) != __alignof__(double) because the specialization
cache (which uses cp_tree_equal as the equality predicate) conflates the
two dependent specializations integral_constant<__alignof__(T)> and
integral_constant<alignof(T)>.
This patch makes cp_tree_equal distinguish between these two operators
by inspecting the ALIGNOF_EXPR_STD_P flag.
Bootstrapped and regtested on x86_64-pc-linux-gnu, and also verified
that we now correctly compile the PR97273 testcase, does this look OK
for trunk and the release branches?
OK.
Shouldn't we then mangle alignof and __alignof__ differently though?
Good point. Then I guess __alignof__ should be mangled as v111__alignof__
Jason