aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-06-19 16:47:35 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-06-19 16:47:35 +0000
commit779704e7cf116eb261248a30d8b7d57157532a58 (patch)
tree115043f9abcfc58fee3a9e901196c7d3eba9702f /gcc/testsuite
parent217655da6f8d9c11e77452d5b4ed421205716bac (diff)
downloadgcc-779704e7cf116eb261248a30d8b7d57157532a58.zip
gcc-779704e7cf116eb261248a30d8b7d57157532a58.tar.gz
gcc-779704e7cf116eb261248a30d8b7d57157532a58.tar.bz2
tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle ADDR_EXPR pointers.
2009-06-19 Richard Guenther <rguenther@suse.de> * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle ADDR_EXPR pointers. (ptr_derefs_may_alias_p): Likewise. (ptr_deref_may_alias_ref_p_1): New function. (ptr_deref_may_alias_ref_p): Likewise. (ref_maybe_used_by_call_p_1): Handle builtins that are not covered by looking at the ESCAPED solution. (call_may_clobber_ref_p_1): Likewise. * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Handle NULL_TREE offset. Do not produce redundant constraints. (process_all_all_constraints): New helper function. (do_structure_copy): Use it. (handle_lhs_call): Likewise. (find_func_aliases): Handle some builtins with pointer arguments and/or return values explicitly. * gcc.c-torture/execute/20090618-1.c: New testcase. From-SVN: r148718
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20090618-1.c21
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fec4369..e1ea0a33 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-19 Richard Guenther <rguenther@suse.de>
+
+ * gcc.c-torture/execute/20090618-1.c: New testcase.
+
2009-06-19 Ian Lance Taylor <iant@google.com>
* gcc.dg/Wcxx-compat-17.c: New testcase.
diff --git a/gcc/testsuite/gcc.c-torture/execute/20090618-1.c b/gcc/testsuite/gcc.c-torture/execute/20090618-1.c
new file mode 100644
index 0000000..f522116
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20090618-1.c
@@ -0,0 +1,21 @@
+extern void abort (void);
+
+struct X { int *p; int *q; };
+
+int foo(void)
+{
+ int i = 0, j = 1;
+ struct X x, y;
+ int **p;
+ y.p = &i;
+ x.q = &j;
+ p = __builtin_mempcpy (&x, &y, sizeof (int *));
+ return **p;
+}
+
+int main()
+{
+ if (foo() != 1)
+ abort ();
+ return 0;
+}