This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ PATCH] Fix same canonical type node ICE for constrained functions (PR c++/68434)


This patch rearranges the step in tsubst where a type's
PLACEHOLDER_TYPE_CONSTRAINTS are set so that it happens before calling
the function canonical_type_parameter.

canonical_type_parameter makes comparisons between types stored in the
canonical_template_parms global variable. One of the steps in
comparing types (equivalent_placeholder_constraints) references the
PLACEHOLDER_TYPE_CONSTRAINTS on types. If constraints aren't set at
this point, types with different PLACEHOLDER_TYPE_CONSTRAINTS can
compare equal and receive the same TYPE_CANONICAL parameter.

Bootstrapped and regression tested on x86_64-linux

2015-11-19  Ryan Burn  <contact@rnburn.com>

      PR c++/68434
       * pt.c (tsubst): Set PLACEHOLDER_TYPE_CONSTRAINTS before
         calling canonical_type_parameter.

       * g++.dg/concepts/pr68434.C: New test

Attachment: pr68434.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]