]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR middle-end/86705 (pr45678-2.c ICE with msp430-elf -mlarge)
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Thu, 2 Aug 2018 20:36:14 +0000 (20:36 +0000)
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>
Thu, 2 Aug 2018 20:36:14 +0000 (20:36 +0000)
2018-08-02  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

Backport from mainline
2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

PR middle-end/86705
* gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
requested variable alignment.
(expand_one_ssa_partition): Likewise.
(expand_one_var): Likewise.

From-SVN: r263277

gcc/ChangeLog
gcc/cfgexpand.c

index a8a30835bc13487a3f5790f8912ddbc9ff16d03c..670dc4d7bc915d1d3de04ef14165c7fafc4f1e17 100644 (file)
@@ -1,3 +1,15 @@
+2018-08-02  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+       Backport from mainline
+       2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+       PR middle-end/86705
+       * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
+       MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
+       requested variable alignment.
+       (expand_one_ssa_partition): Likewise.
+       (expand_one_var): Likewise.
+
 2018-08-01  Richard Biener  <rguenther@suse.de>
 
        PR bootstrap/86724
index e15013b11490182fa99487dc3fc87081f80990d2..4b98582256885c2c48267a30e5351c9908eade96 100644 (file)
@@ -1252,10 +1252,10 @@ set_parm_rtl (tree parm, rtx x)
         allocate it, which means that in-frame portion is just a
         pointer.  ??? We've got a pseudo for sure here, do we
         actually dynamically allocate its spilling area if needed?
-        ??? Isn't it a problem when POINTER_SIZE also exceeds
-        MAX_SUPPORTED_STACK_ALIGNMENT, as on cris and lm32?  */
+        ??? Isn't it a problem when Pmode alignment also exceeds
+        MAX_SUPPORTED_STACK_ALIGNMENT, as can happen on cris and lm32?  */
       if (align > MAX_SUPPORTED_STACK_ALIGNMENT)
-       align = POINTER_SIZE;
+       align = GET_MODE_ALIGNMENT (Pmode);
 
       record_alignment_for_reg_var (align);
     }
@@ -1375,7 +1375,7 @@ expand_one_ssa_partition (tree var)
   /* If the variable alignment is very large we'll dynamicaly allocate
      it, which means that in-frame portion is just a pointer.  */
   if (align > MAX_SUPPORTED_STACK_ALIGNMENT)
-    align = POINTER_SIZE;
+    align = GET_MODE_ALIGNMENT (Pmode);
 
   record_alignment_for_reg_var (align);
 
@@ -1592,7 +1592,7 @@ expand_one_var (tree var, bool toplevel, bool really_expand)
       /* If the variable alignment is very large we'll dynamicaly allocate
         it, which means that in-frame portion is just a pointer.  */
       if (align > MAX_SUPPORTED_STACK_ALIGNMENT)
-       align = POINTER_SIZE;
+       align = GET_MODE_ALIGNMENT (Pmode);
     }
 
   record_alignment_for_reg_var (align);