re PR c++/58581 ([c++11] ICE with no-throw specification in deleted function)
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 31 Oct 2013 10:11:49 +0000 (10:11 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 31 Oct 2013 10:11:49 +0000 (10:11 +0000)
/cp
2013-10-30  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/58581
* call.c (build_over_call): Check return value of mark_used.

/testsuite
2013-10-30  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/58581
* g++.dg/cpp0x/deleted1.C: New.

From-SVN: r204249

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/deleted1.C [new file with mode: 0644]

index ba55d80..04dd264 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-30  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/58581
+       * call.c (build_over_call): Check return value of mark_used.
+
 2013-10-30  Jason Merrill  <jason@redhat.com>
 
        * semantics.c (finish_compound_literal): Don't create a static variable
index 5663010..961ee2c 100644 (file)
@@ -7112,8 +7112,9 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
        mark_versions_used (fn);
     }
 
-  if (!already_used)
-    mark_used (fn);
+  if (!already_used
+      && !mark_used (fn))
+    return error_mark_node;
 
   if (DECL_VINDEX (fn) && (flags & LOOKUP_NONVIRTUAL) == 0
       /* Don't mess with virtual lookup in fold_non_dependent_expr; virtual
index 4c722e7..6819ed0 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-30  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/58581
+       * g++.dg/cpp0x/deleted1.C: New.
+
 2013-10-31  Zhenqiang Chen  <zhenqiang.chen@linaro.org>
 
        * gcc.target/arm/lp1243022.c: New test.
diff --git a/gcc/testsuite/g++.dg/cpp0x/deleted1.C b/gcc/testsuite/g++.dg/cpp0x/deleted1.C
new file mode 100644 (file)
index 0000000..0a632bf
--- /dev/null
@@ -0,0 +1,6 @@
+// PR c++/58581
+// { dg-do compile { target c++11 } }
+
+template<typename T> int foo(T) noexcept(T()) = delete;
+
+int i = foo(0);       // { dg-error "deleted" }