+2020-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/94339
+ * cvt.c (ocp_convert): Handle COMPOUND_EXPR by recursion on the second
+ operand and creating a new COMPOUND_EXPR if anything changed.
+
2020-03-26 Marek Polacek <polacek@redhat.com>
PR c++/94336 - template keyword accepted before destructor names.
if (error_operand_p (e) || type == error_mark_node)
return error_mark_node;
+ if (TREE_CODE (e) == COMPOUND_EXPR)
+ {
+ e = ocp_convert (type, TREE_OPERAND (e, 1), convtype, flags, complain);
+ if (e == error_mark_node)
+ return error_mark_node;
+ if (e == TREE_OPERAND (expr, 1))
+ return expr;
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (e),
+ TREE_OPERAND (expr, 0), e);
+ }
+
complete_type (type);
complete_type (TREE_TYPE (expr));
+2020-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/94339
+ * g++.dg/other/pr94339.C: New test.
+ * g++.dg/ext/attr-copy-2.C: Comment out failing tests due to PR94346.
+
2020-03-27 Roman Zhuykov <zhroma@ispras.ru>
* gcc.c-torture/execute/pr70127-debug-sms.c: New test.
ATTR (copy (*(struct A *)(0, 1))) long m_xpa_0_1;
ATTR (copy (((struct A *)0)[0])) short m_arpa_0;
- ATTR (copy (((struct A *)(1, 0))[0])) int m_arpa_1_0;
- ATTR (copy (((struct A *)(0, 1))[0])) long m_arpa_0_1;
+// ATTR (copy (((struct A *)(1, 0))[0])) int m_arpa_1_0;
+// ATTR (copy (((struct A *)(0, 1))[0])) long m_arpa_0_1;
ATTR (copy (a)) short m_a;
ATTR (copy (b.a)) int m_b_a;
static_assert (__builtin_has_attribute (((C*)0)->m_ra, packed));
static_assert (__builtin_has_attribute (((C*)0)->m_arpa_0, packed));
-static_assert (__builtin_has_attribute (((C*)0)->m_arpa_1_0, packed));
-static_assert (__builtin_has_attribute (((C*)0)->m_arpa_0_1, packed));
+//static_assert (__builtin_has_attribute (((C*)0)->m_arpa_1_0, packed));
+//static_assert (__builtin_has_attribute (((C*)0)->m_arpa_0_1, packed));
static_assert (__builtin_has_attribute (((C*)0)->m_a, packed));
static_assert (__builtin_has_attribute (((C*)0)->m_b_a, packed));
--- /dev/null
+// PR c++/94339
+// { dg-do compile }
+
+unsigned a;
+void bar ();
+
+unsigned
+foo (bool x)
+{
+ return x ? bar (), -1 : a;
+}