]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/7335 (Sparc: ICE in verify_wide_reg (flow.c:557) with long...
authorDavid S. Miller <davem@redhat.com>
Fri, 27 Sep 2002 04:09:07 +0000 (21:09 -0700)
committerDavid S. Miller <davem@gcc.gnu.org>
Fri, 27 Sep 2002 04:09:07 +0000 (21:09 -0700)
2002-09-26  David S. Miller  <davem@redhat.com>

PR optimization/7335
* calls.c (emit_library_call_value_1): Passing args by reference
converts a CONST function into a PURE one.

From-SVN: r57574

gcc/ChangeLog
gcc/calls.c

index 7dd1e5acddc724df043805df161f0c4f5e8a136a..9c6c6ff51767d2d53dcf0ee3af64fefac45b6517 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-26  David S. Miller  <davem@redhat.com>
+
+       * calls.c (emit_library_call_value_1): Passing args by reference
+       converts a CONST function into a PURE one.
+
 2002-09-26  Richard Henderson  <rth@redhat.com>
 
        PR c/7160
index c0a73e7740e96f0d36c9e6d65f9fbcaa7abb5dfc..449c933d212a56c55ef1c76cec848c37e4d4d36a 100644 (file)
@@ -3666,6 +3666,14 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
 #endif
            ;
 
+         /* If this was a CONST function, it is now PURE since
+            it now reads memory.  */
+         if (flags & ECF_CONST)
+           {
+             flags &= ~ECF_CONST;
+             flags |= ECF_PURE;
+           }
+
          if (GET_MODE (val) == MEM && ! must_copy)
            slot = val;
          else if (must_copy)