[llvm-commits] [llvm-gcc-4.2] r53266 - /llvm-gcc-4.2/trunk/gcc/tree.c

Dale Johannesen dalej at apple.com
Tue Jul 8 17:31:44 PDT 2008


Author: johannes
Date: Tue Jul  8 19:31:44 2008
New Revision: 53266

URL: http://llvm.org/viewvc/llvm-project?rev=53266&view=rev
Log:
This reverts the tree.c part of 
http://llvm.org/viewvc/llvm-project?view=rev&revision=40686
which is not correct, because a field of a struct is not
necessarily as aligned as the base of the struct.  Fixes
gcc.c-torture/execute/struct-cpy-1.c
on Darwin x86-32, and probably other x86.

I do not understand what that patch was trying to do, so it's
possible something else will break.  The test Lauro checked
in along with this patch works, though.


Modified:
    llvm-gcc-4.2/trunk/gcc/tree.c

Modified: llvm-gcc-4.2/trunk/gcc/tree.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree.c?rev=53266&r1=53265&r2=53266&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree.c (original)
+++ llvm-gcc-4.2/trunk/gcc/tree.c Tue Jul  8 19:31:44 2008
@@ -1911,11 +1911,7 @@
     case SAVE_EXPR:         case COMPOUND_EXPR:       case MODIFY_EXPR:
     case INIT_EXPR:         case TARGET_EXPR:         case WITH_CLEANUP_EXPR:
     case CLEANUP_POINT_EXPR:
-    /* LLVM local begin */
-    /* return correctly the alignment of packed structs */
-    case COMPONENT_REF:
-    /* LLVM local end */
-      /* These don't change the alignment of an object.  */
+      /* These don't change the alignment of an object. */
       return expr_align (TREE_OPERAND (t, 0));
 
     case COND_EXPR:





More information about the llvm-commits mailing list