expr.c (expand_builtin, [...]): Set MEM_IN_STRUCT_P if the argument is the address...
authorJohn Carr <jfc@mit.edu>
Fri, 24 Apr 1998 13:16:26 +0000 (13:16 +0000)
committerJohn Carr <jfc@gcc.gnu.org>
Fri, 24 Apr 1998 13:16:26 +0000 (13:16 +0000)
* expr.c (expand_builtin, case MEMSET): Set MEM_IN_STRUCT_P
if the argument is the address of a structure or array.
* configure.in: Enable Haifa scheduler by default for SPARC.

From-SVN: r19405

gcc/ChangeLog
gcc/configure.in
gcc/expr.c

index c95f9d630eee358a7d9d4d047100d251ce747717..672c613aed7d82bf1669257571b49944fc388753 100644 (file)
@@ -1,3 +1,10 @@
+Fri Apr 24 16:11:47 1998  John Carr  <jfc@mit.edu>
+
+       * expr.c (expand_builtin, case MEMSET): Set MEM_IN_STRUCT_P
+       if the argument is the address of a structure or array.
+
+       * configure.in: Enable Haifa scheduler by default for SPARC.
+
 Fri Apr 24 20:55:47 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * cse.c (cse_set_around_loop): Don't do optimization when
index 61bfc9a9d0aa81ca4c7e3a8b39d629a229f4a652..689b649482433e650d911884821281a8eaf0994e 100644 (file)
@@ -2891,7 +2891,7 @@ fi
 if [[ x$enable_haifa = x ]]
 then
   case $target in
-    alpha*-* | hppa1.?-* | powerpc*-* | rs6000-*)
+    alpha*-* | hppa1.?-* | powerpc*-* | rs6000-* | *sparc-*)
       enable_haifa=yes;;
   esac
 fi
index f2b97d3bf7ab85035f6123a15c481b62fd33a5a8..8473181d72595befc79a68a4530a55d5358f9016 100644 (file)
@@ -8634,7 +8634,13 @@ expand_builtin (exp, target, subtarget, mode, ignore)
          /* There could be a void* cast on top of the object.  */
          while (TREE_CODE (dest) == NOP_EXPR)
            dest = TREE_OPERAND (dest, 0);
-         type = TREE_TYPE (TREE_TYPE (dest));
+
+         if (TREE_CODE (dest) == ADDR_EXPR)
+           /* If this is the address of an object, check whether the
+              object is an array.  */
+           type = TREE_TYPE (TREE_OPERAND (dest, 0));
+         else
+           type = TREE_TYPE (TREE_TYPE (dest));
          MEM_IN_STRUCT_P (dest_mem) = AGGREGATE_TYPE_P (type);
 
          dest_addr = clear_storage (dest_mem, len_rtx, dest_align);