* calls.c (store_unaligned_arguments_into_pseudos): Deal only with
values living in memory and use more precise alignment information.
From-SVN: r141742
+2008-11-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * calls.c (store_unaligned_arguments_into_pseudos): Deal only with
+ values living in memory and use more precise alignment information.
+
2008-11-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/35314
for (i = 0; i < num_actuals; i++)
if (args[i].reg != 0 && ! args[i].pass_on_stack
&& args[i].mode == BLKmode
- && (TYPE_ALIGN (TREE_TYPE (args[i].tree_value))
+ && MEM_P (args[i].value)
+ && (MEM_ALIGN (args[i].value)
< (unsigned int) MIN (BIGGEST_ALIGNMENT, BITS_PER_WORD)))
{
int bytes = int_size_in_bytes (TREE_TYPE (args[i].tree_value));
+2008-11-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pack11.adb: New test.
+
2008-11-10 Jakub Jelinek <jakub@redhat.com>
PR c++/38021
--- /dev/null
+-- { dg-do run }
+-- { dg-options "-gnatws" }
+
+with System;
+
+procedure Pack11 is
+
+ type R1 is record
+ A1, A2, A3 : System.Address;
+ end record;
+
+ type R2 is record
+ C : Character;
+ R : R1;
+ end record;
+ pragma Pack (R2);
+
+ procedure Dummy (R : R1) is begin null; end;
+
+ procedure Init (X : R2) is
+ begin
+ Dummy (X.R);
+ end;
+
+ My_R2 : R2;
+
+begin
+ Init (My_R2);
+end;