summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/20_util/unique_ptr
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-04-17 23:32:24 -0400
committerJason Merrill <jason@gcc.gnu.org>2019-04-17 23:32:24 -0400
commit5a58e967b526eba3d9b850cd7bc76dcc580bf708 (patch)
tree844ecad256d70dffae00df101a967a92775604d0 /libstdc++-v3/testsuite/20_util/unique_ptr
parent19caab83ca8b30a1a37ec968aaea8086b096d113 (diff)
downloadgcc-5a58e967b526eba3d9b850cd7bc76dcc580bf708.tar.gz
PR c++/90047 - ICE with enable_if alias template.
In order to make alias templates useful for SFINAE we instantiate them under the prevailing 'complain' argument, so an error encountered while instantiating during SFINAE context is silent. The problem in this PR comes when we later look up the erroneous instantiation and don't give an error at that point. Fixed by not adding an erroneous instantiation to the hash table, so we instantiate it again when needed and get the error. This required changes to a number of tests, which previously said "substitution failed:" with no explanation of what the failure was; now we properly explain. * pt.c (tsubst_decl) [TYPE_DECL]: Don't put an erroneous decl in the hash table when we're in SFINAE context. From-SVN: r270433
Diffstat (limited to 'libstdc++-v3/testsuite/20_util/unique_ptr')
-rw-r--r--libstdc++-v3/testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc2
2 files changed, 4 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc
index 81a67b3a025..f6e2ea09b5e 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc
@@ -51,3 +51,5 @@ main()
test02();
return 0;
}
+
+// { dg-prune-output "enable_if" }
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc
index 6a794313cfb..745dea474d6 100644
--- a/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc
@@ -55,3 +55,5 @@ test02()
std::unique_ptr<const volatile A[]> cvA3;
cvA3.reset(p); // { dg-error "no matching function" }
}
+
+// { dg-prune-output "enable_if" }