]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
varasm.c (const_hash): Handle FDESC_EXPR like ADDR_EXPR.
authorJakub Jelinek <jakub@redhat.com>
Mon, 10 Jun 2002 21:44:43 +0000 (23:44 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 10 Jun 2002 21:44:43 +0000 (23:44 +0200)
* 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: r54461

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/varasm.c

index a90a915f7bc7d1bf2769a9d353acdd4bc5f53438..03d7b843dbc21961f42a588a7dbfa7262a9d8f1e 100644 (file)
@@ -1,3 +1,9 @@
+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
index 83708fdfe0e6cf545de5aa55f8f25b405494c4cd..65fe5917ef089ba2ca73bf9b92a1cba507156c8c 100644 (file)
@@ -2,6 +2,8 @@
 
        * gcc.c-torture/compile/20020605-1.c: New test.
 
+       * g++.dg/opt/vt1.C: New test.
+
 2002-05-29  Hans-Peter Nilsson  <hp@axis.com>
 
        * gcc.c-torture/execute/20020529-1.c: New test.
index 6e55628611270f531fafc7cff3bb97e368f0f771..4c27011bc8c7f0b5cea2f0e3d4ab950a637f09ac 100644 (file)
@@ -2561,6 +2561,7 @@ const_hash (exp)
        }
 
     case ADDR_EXPR:
+    case FDESC_EXPR:
       {
        struct addr_const value;
 
@@ -2802,6 +2803,7 @@ compare_constant_1 (exp, p)
        }
 
     case ADDR_EXPR:
+    case FDESC_EXPR:
       {
        struct addr_const value;
 
@@ -4248,6 +4250,7 @@ output_addressed_constants (exp)
   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.  */