aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn Carr <jfc@mit.edu>1998-04-24 13:16:26 +0000
committerJohn Carr <jfc@gcc.gnu.org>1998-04-24 13:16:26 +0000
commit87d1ea793724015e9ffba50946252e720a589ed6 (patch)
tree04bfefda4a4bde62827f3f94982c760a99df976b /gcc
parente89d3e6fafba3bb7bfcda0e4a0096aac80200c1d (diff)
downloadgcc-87d1ea793724015e9ffba50946252e720a589ed6.zip
gcc-87d1ea793724015e9ffba50946252e720a589ed6.tar.gz
gcc-87d1ea793724015e9ffba50946252e720a589ed6.tar.bz2
expr.c (expand_builtin, [...]): Set MEM_IN_STRUCT_P if the argument is the address of a structure or array.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/configure.in2
-rw-r--r--gcc/expr.c8
3 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c95f9d6..672c613 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/configure.in b/gcc/configure.in
index 61bfc9a..689b649 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -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
diff --git a/gcc/expr.c b/gcc/expr.c
index f2b97d3..8473181 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -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);