function.c (assign_parm_setup_block): Use the stored size...
authorHans-Peter Nilsson <hp@axis.com>
Mon, 11 Feb 2019 09:03:51 +0000 (09:03 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Mon, 11 Feb 2019 09:03:51 +0000 (09:03 +0000)
* function.c (assign_parm_setup_block): Use the stored
size, not the passed size, when allocating stack-space,
also for a parameter with alignment larger than
MAX_SUPPORTED_STACK_ALIGNMENT.

From-SVN: r268763

gcc/ChangeLog
gcc/function.c

index 9e938f753b0b0bf707a9a43a3ee5ef9c8c736894..a4cc46a5fc8eabc57e72dae83639018aa9a40385 100644 (file)
@@ -1,3 +1,10 @@
+2019-02-11  Hans-Peter Nilsson  <hp@axis.com>
+
+       * function.c (assign_parm_setup_block): Use the stored
+       size, not the passed size, when allocating stack-space,
+       also for a parameter with alignment larger than
+       MAX_SUPPORTED_STACK_ALIGNMENT.
+
 2019-02-11  Martin Liska  <mliska@suse.cz>
 
        PR ipa/89009
index 1525d8bc29a38f571f118efa4da5c2e6e47818e2..dc035707c208f039fbd25b6add567fc426ccf0d6 100644 (file)
@@ -2915,7 +2915,7 @@ assign_parm_setup_block (struct assign_parm_data_all *all,
       SET_DECL_ALIGN (parm, MAX (DECL_ALIGN (parm), BITS_PER_WORD));
       if (DECL_ALIGN (parm) > MAX_SUPPORTED_STACK_ALIGNMENT)
        {
-         rtx allocsize = gen_int_mode (size, Pmode);
+         rtx allocsize = gen_int_mode (size_stored, Pmode);
          get_dynamic_stack_size (&allocsize, 0, DECL_ALIGN (parm), NULL);
          stack_parm = assign_stack_local (BLKmode, UINTVAL (allocsize),
                                           MAX_SUPPORTED_STACK_ALIGNMENT);