OSDN Git Service

Fix ChangeLog entry.
[pf3gnuchains/gcc-fork.git] / gcc / builtins.c
index a628342..c4200c2 100644 (file)
@@ -278,8 +278,13 @@ get_pointer_alignment (tree exp, unsigned int max_align)
          inner = max_align;
          while (handled_component_p (exp))
            {
+             /* Fields in a structure can be packed, honour DECL_ALIGN
+                of the FIELD_DECL.  For all other references the conservative 
+                alignment is the element type alignment.  */
              if (TREE_CODE (exp) == COMPONENT_REF)
                inner = MIN (inner, DECL_ALIGN (TREE_OPERAND (exp, 1)));
+             else
+               inner = MIN (inner, TYPE_ALIGN (TREE_TYPE (exp)));
              exp = TREE_OPERAND (exp, 0);
            }
          if (TREE_CODE (exp) == FUNCTION_DECL)
@@ -288,7 +293,7 @@ get_pointer_alignment (tree exp, unsigned int max_align)
            align = MIN (inner, DECL_ALIGN (exp));
 #ifdef CONSTANT_ALIGNMENT
          else if (CONSTANT_CLASS_P (exp))
-           align = CONSTANT_ALIGNMENT (exp, align);
+           align = MIN (inner, (unsigned)CONSTANT_ALIGNMENT (exp, align));
 #endif
          else
            align = MIN (align, inner);
@@ -5376,6 +5381,8 @@ expand_builtin_fork_or_exec (tree fn, tree arglist, rtx target, int ignore)
   TREE_PUBLIC (decl) = 1;
   DECL_ARTIFICIAL (decl) = 1;
   TREE_NOTHROW (decl) = 1;
+  DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT;
+  DECL_VISIBILITY_SPECIFIED (decl) = 1;
   call = build_function_call_expr (decl, arglist);
 
   return expand_call (call, target, ignore);