aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorBarrett Adair <barrettellisadair@gmail.com>2021-09-15 15:26:22 -0500
committerJason Merrill <jason@redhat.com>2021-09-22 00:03:12 -0400
commit72394d38d929c72cad6cf706a0e790b5934f2bf1 (patch)
tree05207034314d23f2bb5d0d57e28bd9f611574ac4 /gcc/omp-low.c
parent2c41dd82e23c296681aa466693bfc726e2d919ce (diff)
downloadgcc-72394d38d929c72cad6cf706a0e790b5934f2bf1.zip
gcc-72394d38d929c72cad6cf706a0e790b5934f2bf1.tar.gz
gcc-72394d38d929c72cad6cf706a0e790b5934f2bf1.tar.bz2
c++: fix template instantiation comparison in redeclarations
This change fixes a primordial c++11 frontend defect where function template redeclarations with trailing return types that used dependent sizeof/alignof/noexcept expressions in template value arguments failed to compare as equivalent to the identical primary template declaration. By forcing structural AST comparison of the template arguments, we no longer require TYPE_CANONICAL to match in this case. The new canon-type-{15..18}.C tests failed with all prior GCC versions, where the redeclarations were incorrectly reported as ambiguous overloads. The new dependent-name{15,16}.C tests are regression tests for sneaky problems encountered during development of this fix. Note that this fix does not address the use of parm objects' constexpr members as template arguments within a declaration (a superficially similar longstanding defect). gcc/cp/ChangeLog: * pt.c (find_parm_usage_r): New walk_tree callback to find func parms. (any_template_arguments_need_structural_equality_p): New special case. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-52830.C: Remove unwanted dg-ice. * g++.dg/template/canon-type-15.C: New test. * g++.dg/template/canon-type-16.C: New test. * g++.dg/template/canon-type-17.C: New test. * g++.dg/template/canon-type-18.C: New test. * g++.dg/template/dependent-name15.C: New regression test. * g++.dg/template/dependent-name16.C: New regression test.
Diffstat (limited to 'gcc/omp-low.c')
0 files changed, 0 insertions, 0 deletions