OSDN Git Service

2005-10-06 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Oct 2005 16:20:14 +0000 (16:20 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Oct 2005 16:20:14 +0000 (16:20 +0000)
PR tree-optimization/24238
* tree-ssa-alias.c (find_used_portions): Handle PARAM_DECL.

* g++.dg/tree-ssa/pr24238.C: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105043 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr24238.C [new file with mode: 0644]
gcc/tree-ssa-alias.c

index e03453b..5ddf69b 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-06  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/24238
+       * tree-ssa-alias.c (find_used_portions): Handle PARAM_DECL.
+
 2005-10-06  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * acinclude.m4 (gcc_AC_CHECK_TOOL): Handle environment variables
index 71b4ecb..4d96427 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-06  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/24238
+       * g++.dg/tree-ssa/pr24238.C: New testcase.
+
 2005-10-07  Erik Edelmann  <erik.edelmann@iki.fi>
 
        PR 18568
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr24238.C b/gcc/testsuite/g++.dg/tree-ssa/pr24238.C
new file mode 100644 (file)
index 0000000..3fdd578
--- /dev/null
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef struct SDL_Rect {
+    unsigned short w, h;
+}SDL_Rect;
+SDL_Rect *location();
+SDL_Rect inner_location()
+{
+    SDL_Rect r = *location();
+    r.w -= 1;
+    return r;
+}
index 30c1e9d..8ce285f 100644 (file)
@@ -2765,6 +2765,7 @@ find_used_portions (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
       break;
     case VAR_DECL:
     case PARM_DECL:
+    case RESULT_DECL:
       {
        tree var = *tp;
        if (DECL_SIZE (var)