]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/36125 (FAIL: 26_numerics/complex/13450.cc: ICE in verify_gimple_expr...
authorJakub Jelinek <jakub@redhat.com>
Fri, 14 Nov 2008 07:50:52 +0000 (08:50 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 14 Nov 2008 07:50:52 +0000 (08:50 +0100)
PR middle-end/36125
* function.c (gimplify_parameters): For callee copies parameters,
move TREE_ADDRESSABLE flag from the PARM_DECL to the local copy.

* gcc.c-torture/compile/pr36125.c: New test.

From-SVN: r141848

gcc/ChangeLog
gcc/function.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr36125.c [new file with mode: 0644]

index a01c06e5c390939efd5d0e4b7bed0d26f4de3783..55afd9c9d3c91c998b92eebf74a51c676fbd8579 100644 (file)
@@ -1,3 +1,9 @@
+2008-11-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/36125
+       * function.c (gimplify_parameters): For callee copies parameters,
+       move TREE_ADDRESSABLE flag from the PARM_DECL to the local copy.
+
 2008-11-13  Thomas Schwinge  <tschwinge@gnu.org>
 
        PR target/28102
index b40b0dbff96673acaabb1a1e6e45fccad213fea2..233ff6d09b5dda3821fd098ca111ae28b37cf097 100644 (file)
@@ -3265,6 +3265,14 @@ gimplify_parameters (void)
                {
                  local = create_tmp_var (type, get_name (parm));
                  DECL_IGNORED_P (local) = 0;
+                 /* If PARM was addressable, move that flag over
+                    to the local copy, as its address will be taken,
+                    not the PARMs.  */
+                 if (TREE_ADDRESSABLE (parm))
+                   {
+                     TREE_ADDRESSABLE (parm) = 0;
+                     TREE_ADDRESSABLE (local) = 1;
+                   }
                }
              else
                {
index 898aaf24150373e661f1d50a82e90cce83a3c449..bea2964c373322005ee84ba43563b68c6627fdff 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/36125
+       * gcc.c-torture/compile/pr36125.c: New test.
+
 2008-11-13  Jason Merrill  <jason@redhat.com>
 
        PR c++/37932
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr36125.c b/gcc/testsuite/gcc.c-torture/compile/pr36125.c
new file mode 100644 (file)
index 0000000..9257e84
--- /dev/null
@@ -0,0 +1,10 @@
+/* PR middle-end/36125 */
+
+extern void bar (long double *);
+
+int
+foo (long double x)
+{
+  bar (&x);
+  return 0;
+}