diff --git a/gcc/ChangeLog b/gcc/ChangeLog index df7c5e3f38495b5f2c90622ade293d87aa3813fb..5c2cf3d8b2c493caeb7ecff7f34e0d99d827c7db 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,10 +1,17 @@ +2006-09-16 Andrew Pinski <pinskia@physics.uc.edu> + + PR tree-opt/29059 + * tree-ssa-propagate.c (set_rhs): Reject MODIFY_EXPR right + away for the expr argument. + 2006-09-16 Steven Bosscher <steven@gcc.gnu.org> + PR tree-opt/27742 * tree-vectorizer.c (vectorize_loops): Clear vect_loop_location before using it for dumping after vectorizing loops. -2006-09-16 Andrew Pinski <pinskia@physics.uc.edu> - Jack Howarth <howarth@bromo.med.uc.edu> +2006-09-16 Andrew Pinski <pinskia@physics.uc.edu> + Jack Howarth <howarth@bromo.med.uc.edu> PR target/29030 * config/rs6000/rs6000.c (rs6000_darwin64_record_arg_advance_recurse) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 357a379bbe956be39f51ff8ec530ef465b95a43b..6a27b73c1344eb247e5b266a1f7b05ce6af3fdf8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2006-09-16 Andrew Pinski <pinskia@physics.uc.edu> + + PR tree-opt/29059 + * gcc.c-torture/compile/strcpy-1.c: New test. + * gcc.c-torture/compile/strcpy-2.c: New test. + * gcc.c-torture/compile/memcpy-1.c: New test. + * gcc.c-torture/compile/memcpy-2.c: New test. + 2006-09-16 Jack Howarth <howarth@bromo.med.uc.edu> PR testsuite/29055 diff --git a/gcc/testsuite/gcc.c-torture/compile/memcpy-1.c b/gcc/testsuite/gcc.c-torture/compile/memcpy-1.c new file mode 100644 index 0000000000000000000000000000000000000000..4a4e7509654285c7bcbe1058af8320e92434f5d5 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/memcpy-1.c @@ -0,0 +1,9 @@ +static const char OggFLAC__MAPPING_VERSION_MAJOR = 1; +void f(void) +{ + char synthetic_first_packet_body[10]; + char *b = &synthetic_first_packet_body[4]; + __builtin_memcpy (b, &OggFLAC__MAPPING_VERSION_MAJOR, (1u)); +} + + diff --git a/gcc/testsuite/gcc.c-torture/compile/memcpy-2.c b/gcc/testsuite/gcc.c-torture/compile/memcpy-2.c new file mode 100644 index 0000000000000000000000000000000000000000..4645ced597ebc46f4acabd5422a9f0fa0ec9f463 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/memcpy-2.c @@ -0,0 +1,10 @@ +static const char OggFLAC__MAPPING_VERSION_MAJOR = 1; +void f(void) +{ + char synthetic_first_packet_body[10]; + char *b = synthetic_first_packet_body; + b+=4u; + __builtin_memcpy (b, &OggFLAC__MAPPING_VERSION_MAJOR, (1u)); +} + + diff --git a/gcc/testsuite/gcc.c-torture/compile/strcpy-1.c b/gcc/testsuite/gcc.c-torture/compile/strcpy-1.c new file mode 100644 index 0000000000000000000000000000000000000000..2c7b16a08d810856965613e0fd24031acf55f177 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/strcpy-1.c @@ -0,0 +1,15 @@ + + +typedef struct +{ + char str[20]; +}STACK; +STACK stack[15]; +int level; +rezero () +{ + level = 0; + __builtin_strcpy (stack[level].str, ""); +} + + diff --git a/gcc/testsuite/gcc.c-torture/compile/strcpy-2.c b/gcc/testsuite/gcc.c-torture/compile/strcpy-2.c new file mode 100644 index 0000000000000000000000000000000000000000..075cdd1f6ab371bd3a000dbc1cdc07ad71e11a11 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/strcpy-2.c @@ -0,0 +1,7 @@ +char wrkstr_un[270]; +extern void +LoadUserAlph (char *s) +{ + s = &wrkstr_un[0]; + __builtin_strcpy (s, ""); +}; diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index 00d5a9458896fa9780afedb86009cc6ab150e34d..111b39d3ab38ad94c787cb040d540eef1c7a5b21 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -588,7 +588,8 @@ set_rhs (tree *stmt_p, tree expr) && !is_gimple_val (TREE_OPERAND (TREE_OPERAND (expr, 0), 1))) return false; } - else if (code == COMPOUND_EXPR) + else if (code == COMPOUND_EXPR + || code == MODIFY_EXPR) return false; switch (TREE_CODE (stmt))