* dse.c (check_mem_read_rtx): Guard against width == -1.
testsuite/
* gcc.c-torture/compile/pr40035.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147498
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-05-13 Jakub Jelinek <jakub@redhat.com>
+ Ben Elliston <bje@au.ibm.com>
+
+ PR middle-end/40035
+ * dse.c (check_mem_read_rtx): Guard against width == -1.
+
2009-05-13 Michael Matz <matz@suse.de>
PR middle-end/39976
if (store_info->rhs
&& store_info->group_id == -1
&& store_info->cse_base == base
+ && width != -1
&& offset >= store_info->begin
&& offset + width <= store_info->end
&& all_positions_needed_p (store_info,
+2009-05-14 Ben Elliston <bje@au.ibm.com>
+
+ PR middle-end/40035
+ * gcc.c-torture/compile/pr40035.c: New test.
+
2009-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.target/i386/pr39543-2.c: Skip if ilp32 && pic.
* gfortran.dg/c_kind_tests_2.f03: Ditto.
* gfortran.dg/interop_params.f03: Ditto.
-
2009-05-12 Jan Hubicka <jh@suse.cz>
* gcc.dg/tree-ssa/loop-36.c: Reduce amount of iterations to 2 so unrolling
--- /dev/null
+typedef __SIZE_TYPE__ size_t;
+void *memmove (void *dest, const void *src, size_t count);
+size_t strlen (const char *s);
+
+int
+foo (char *param, char *val)
+{
+ if (val)
+ {
+ if (val == param + strlen (param) + 1)
+ val[-1] = '=';
+ else if (val == param + strlen (param) + 2)
+ {
+ val[-2] = '=';
+ memmove (val - 1, val, strlen (val) + 1);
+ val--;
+ }
+ }
+ return 0;
+}