* config/i386/i386.c (classify_argument) <ARRAY_TYPE>: Promote partial
integer class to full integer class if the offset is not word-aligned.
From-SVN: r141559
+2008-11-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/i386/i386.c (classify_argument) <ARRAY_TYPE>: Promote partial
+ integer class to full integer class if the offset is not word-aligned.
+
2008-11-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR rtl-opt/37782
2008-11-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR rtl-opt/37782
/* The partial classes are now full classes. */
if (subclasses[0] == X86_64_SSESF_CLASS && bytes != 4)
subclasses[0] = X86_64_SSE_CLASS;
/* The partial classes are now full classes. */
if (subclasses[0] == X86_64_SSESF_CLASS && bytes != 4)
subclasses[0] = X86_64_SSE_CLASS;
- if (subclasses[0] == X86_64_INTEGERSI_CLASS && bytes != 4)
+ if (subclasses[0] == X86_64_INTEGERSI_CLASS
+ && !((bit_offset % 64) == 0 && bytes == 4))
subclasses[0] = X86_64_INTEGER_CLASS;
for (i = 0; i < words; i++)
subclasses[0] = X86_64_INTEGER_CLASS;
for (i = 0; i < words; i++)
+2008-11-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/execute/20081103-1.c: New test.
+
2008-11-03 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/array5.adb New test.
2008-11-03 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/array5.adb New test.
--- /dev/null
+struct S { char c; char arr[4]; float f; };
+
+char A[4] = { '1', '2', '3', '4' };
+
+void foo (struct S s)
+{
+ if (__builtin_memcmp (s.arr, A, 4))
+ __builtin_abort ();
+}
+
+int main (void)
+{
+ struct S s;
+ __builtin_memcpy (s.arr, A, 4);
+ foo (s);
+ return 0;
+}