* varasm.c (const_hash): Handle FDESC_EXPR like ADDR_EXPR.
(compare_constant): Likewise.
(output_addressed_constants): Likewise.
* g++.dg/opt/vt1.C: New test.
From-SVN: r54459
2002-06-10 Jakub Jelinek <jakub@redhat.com>
+ * varasm.c (const_hash): Handle FDESC_EXPR like ADDR_EXPR.
+ (compare_constant): Likewise.
+ (output_addressed_constants): Likewise.
+
+2002-06-10 Jakub Jelinek <jakub@redhat.com>
+
* cfgcleanup.c (try_optimize_cfg): Make sure merge_blocks doesn't
merge bb with itself.
* gcc.c-torture/compile/20020605-1.c: New test.
+ * g++.dg/opt/vt1.C: New test.
+
2002-06-07 Roger Sayle <roger@eyesopen.com>
* gcc.dg/20020607-2.c: New test case.
--- /dev/null
+// Test whether vtable for S is not put into read-only section.
+// { dg-do compile }
+// { dg-options "-O2 -fpic -fno-rtti" }
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+struct S
+{
+ virtual void vm (void) {};
+} x;
+
+// { dg-final { scan-assembler-not "section.*_ZTV1S.*\"\[^w\"\]*\"" } }
}
case ADDR_EXPR:
+ case FDESC_EXPR:
{
struct addr_const value;
}
case ADDR_EXPR:
+ case FDESC_EXPR:
{
struct addr_const value1, value2;
switch (TREE_CODE (exp))
{
case ADDR_EXPR:
+ case FDESC_EXPR:
/* Go inside any operations that get_inner_reference can handle and see
if what's inside is a constant: no need to do anything here for
addresses of variables or functions. */