* calls.c (expand_call): Fix recognition of C++ operator new.
authorjfc <jfc@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Apr 1998 12:41:21 +0000 (12:41 +0000)
committerjfc <jfc@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Apr 1998 12:41:21 +0000 (12:41 +0000)
* alias.c (mode_alias_check): Disable type based alias detection.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19492 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/alias.c
gcc/calls.c

index 4cb493c..341de00 100644 (file)
@@ -1,3 +1,9 @@
+Wed Apr 29 15:34:40 1998  John Carr  <jfc@mit.edu>
+
+       * calls.c (expand_call): Fix recognition of C++ operator new.
+
+       * alias.c (mode_alias_check): Disable type based alias detection.
+
 Wed Apr 29 15:06:42 1998  Gavin Koch  <gavin@cygnus.com>
 
        * config/mips/elf.h (ASM_OUTPUT_DEF,ASM_WEAKEN_LABEL,
index a9024b8..148b452 100644 (file)
@@ -859,6 +859,11 @@ mode_alias_check (x, y, varies)
      register rtx x, y;
      int (*varies) PROTO ((rtx));
 {
+#if 1
+  /* gcc rules: all type aliasing allowed  */
+  return 1;
+#else
+  /* ANSI C rules: different types do not alias. */
   enum machine_mode x_mode = GET_MODE (x), y_mode = GET_MODE (y);
   rtx x_addr = XEXP (x, 0), y_addr = XEXP (y, 0);
   int x_varies, y_varies, x_struct, y_struct;
@@ -903,6 +908,7 @@ mode_alias_check (x, y, varies)
   /* Both are varying structs or fixed scalars.  Check that they are not
      the same type.  */
   return (x_struct == y_struct);
+#endif
 }
 
 /* Read dependence: X is read after read in MEM takes place.  There can
index 5c34913..51fa73b 100644 (file)
@@ -901,8 +901,12 @@ expand_call (exp, target, ignore)
       else if (! strcmp (tname, "malloc")
               || ! strcmp (tname, "calloc")
               || ! strcmp (tname, "realloc")
-              || ! strcmp (tname, "__builtin_new")
-              || ! strcmp (tname, "__builtin_vec_new"))
+              /* Note use of NAME rather than TNAME here.  These functions
+                 are only reserved when preceded with __.  */
+              || ! strcmp (name, "__vn")       /* mangled __builtin_vec_new */
+              || ! strcmp (name, "__nw")       /* mangled __builtin_new */
+              || ! strcmp (name, "__builtin_new")
+              || ! strcmp (name, "__builtin_vec_new"))
        is_malloc = 1;
     }