diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/function.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr36125.c | 10 |
4 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a01c06e..55afd9c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/function.c b/gcc/function.c index b40b0db..233ff6d 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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 { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 898aaf2..bea2964 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 index 0000000..9257e84 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr36125.c @@ -0,0 +1,10 @@ +/* PR middle-end/36125 */ + +extern void bar (long double *); + +int +foo (long double x) +{ + bar (&x); + return 0; +} |