* optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
* g++.old-deja/g++.other/cleanup4.C: New test.
From-SVN: r38110
+2000-12-07 Jakub Jelinek <jakub@redhat.com>
+
+ * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
+
2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
* decl2.c (lang_decode_option): Handle -Wformat-security.
{
*tp = build_stmt (EXPR_STMT,
RETURN_EXPR (return_stmt));
+ STMT_IS_FULL_EXPR_P (*tp) = 1;
/* And then jump to the end of the function. */
TREE_CHAIN (*tp) = goto_stmt;
}
+2000-12-07 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.old-deja/g++.other/cleanup4.C: New test.
+
2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
* format-sec-1.c: New test.
--- /dev/null
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+// Special g++ Options: -O2 -fno-exceptions
+
+class foo
+{
+public:
+ foo ();
+ ~foo ();
+};
+
+class bar
+{
+public:
+ bar ();
+ bar (const foo&);
+};
+
+int i;
+foo f ();
+
+inline bar x ()
+{
+ switch (i)
+ {
+ case 0: return bar (f ());
+ default: return bar ();
+ }
+}
+
+bar y ()
+{
+ return x ();
+}