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
+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
|| 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.
--- /dev/null
+// { 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)
+ {
+ }
+}