Commit f22e586c by Richard Biener Committed by Richard Biener

re PR middle-end/89790 (ICE segfault in operand_equal_p() at fold-const.c:3000…

re PR middle-end/89790 (ICE segfault in operand_equal_p() at fold-const.c:3000 with -Wduplicated-cond since r269838)

2019-03-25  Richard Biener  <rguenther@suse.de>

	PR middle-end/89790
	* fold-const.c (operand_equal_p): Revert last change with
	updated comment.

	* g++.dg/pr89790.C: New testcase.

From-SVN: r269907
parent 4c6d441d
2019-03-25 Richard Biener <rguenther@suse.de>
PR middle-end/89790
* fold-const.c (operand_equal_p): Revert last change with
updated comment.
2019-03-24 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Add REG_EQUAL
......
......@@ -2973,6 +2973,11 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
|| TREE_TYPE (arg1) == error_mark_node)
return 0;
/* Similar, if either does not have a type (like a template id),
they aren't equal. */
if (!TREE_TYPE (arg0) || !TREE_TYPE (arg1))
return 0;
/* We cannot consider pointers to different address space equal. */
if (POINTER_TYPE_P (TREE_TYPE (arg0))
&& POINTER_TYPE_P (TREE_TYPE (arg1))
......
2019-03-25 Richard Biener <rguenther@suse.de>
PR middle-end/89790
* g++.dg/pr89790.C: New testcase.
2019-03-24 Uroš Bizjak <ubizjak@gmail.com>
* gcc.target/i386/pr82281.c: Compile only for ia32 effective target.
......
// { dg-do compile }
// { dg-options "-Wduplicated-cond" }
template <typename>
class a
{
typedef a b;
template <typename> void c();
};
template <typename d> template <typename>
void a<d>::c()
{
int f;
b g;
if (g == 0)
;
else if (f)
{
}
}
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