Commit 7c719d08 by David Malcolm Committed by David Malcolm

C++: Fix ICE in fold_for_warn on CAST_EXPR (PR c++/83974)

gcc/cp/ChangeLog:
	PR c++/83974
	* pt.c (tsubst_copy_and_build) <CONSTRUCTOR>: Remove early bailout
	for pointer to member function types.

gcc/testsuite/ChangeLog:
	PR c++/83974
	* g++.dg/warn/pr83974.C: New test case.

From-SVN: r256999
parent 508d0c3d
2018-01-23 David Malcolm <dmalcolm@redhat.com>
PR c++/83974
* pt.c (tsubst_copy_and_build) <CONSTRUCTOR>: Remove early bailout
for pointer to member function types.
2018-01-23 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/83987
......
......@@ -18097,10 +18097,6 @@ tsubst_copy_and_build (tree t,
if (type == error_mark_node)
RETURN (error_mark_node);
/* digest_init will do the wrong thing if we let it. */
if (type && TYPE_PTRMEMFUNC_P (type))
RETURN (t);
/* We do not want to process the index of aggregate
initializers as they are identifier nodes which will be
looked up by digest_init. */
......
2018-01-23 David Malcolm <dmalcolm@redhat.com>
PR c++/83974
* g++.dg/warn/pr83974.C: New test case.
2018-01-23 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/83987
......
// { dg-options "-Wtautological-compare" }
struct A {
typedef void (A::*B) ();
operator B ();
};
template <typename>
struct C {
void foo () { d == 0; }
A d;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment