]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/calls.c
2002-09-26 David S. Miller <davem@redhat.com>
[thirdparty/gcc.git] / gcc / calls.c
index d4e3f00958934a7444c9940e58f08affc43fab6a..ffedacabbb051f1e890c0e26649734f731dd6714 100644 (file)
@@ -3684,6 +3684,14 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
            }
          flags &= ~(ECF_CONST | ECF_PURE | ECF_LIBCALL_BLOCK);
 
+         /* 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)