Index: gcc/builtins.c =================================================================== 304a305,306 > tree fntype = exp ? TREE_TYPE (exp) : NULL_TREE; > 309,310c311,312 < if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn) < align = 2 * BITS_PER_UNIT; --- > align = MAX (minimum_function_boundary (exp), align); > Index: gcc/cp/decl.c =================================================================== 7855,7858c7855 < if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn < && TREE_CODE (type) == METHOD_TYPE < && DECL_ALIGN (decl) < 2 * BITS_PER_UNIT) < DECL_ALIGN (decl) = 2 * BITS_PER_UNIT; --- > DECL_ALIGN (decl) = MAX (minimum_function_boundary (decl), DECL_ALIGN (decl)); Index: gcc/cp/lambda.c =================================================================== 1010,1012c1010,1011 < if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn < && DECL_ALIGN (fn) < 2 * BITS_PER_UNIT) < DECL_ALIGN (fn) = 2 * BITS_PER_UNIT; --- > extern int need_vptr_align (void); > DECL_ALIGN (fn) = MAX (minimum_function_boundary (fn), DECL_ALIGN (fn)); 1045,1047c1044 < if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn < && DECL_ALIGN (fn) < 2 * BITS_PER_UNIT) < DECL_ALIGN (fn) = 2 * BITS_PER_UNIT; --- > DECL_ALIGN (fn) = MAX (minimum_function_boundary (fn), DECL_ALIGN (fn)); Index: gcc/cp/method.c =================================================================== 1852c1852 < --- > 1856,1858c1856 < if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn < && DECL_ALIGN (fn) < 2 * BITS_PER_UNIT) < DECL_ALIGN (fn) = 2 * BITS_PER_UNIT; --- > DECL_ALIGN (fn) = MAX (minimum_function_boundary (fn), DECL_ALIGN (fn)); Index: gcc/function.c =================================================================== 4791a4792,4806 > unsigned int > minimum_function_boundary (tree fndecl) > { > gcc_assert (fndecl); > > tree fntype = TREE_TYPE (fndecl); > > if (TREE_CODE (fntype) == METHOD_TYPE > && TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn > && FUNCTION_BOUNDARY < 2 * BITS_PER_UNIT) > return 2 * BITS_PER_UNIT; > > return FUNCTION_BOUNDARY; > } > 4842a4858,4861 > > /* Similarly, relayout function's alignment if not forced. */ > if (!DECL_USER_ALIGN (fndecl)) > DECL_ALIGN (fndecl) = minimum_function_boundary (fndecl); Index: gcc/function.h =================================================================== 601c601 < --- > extern unsigned int minimum_function_boundary (tree); Index: gcc/java/class.c =================================================================== 785,788c785,786 < if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn < && !(access_flags & ACC_STATIC) < && DECL_ALIGN (fndecl) < 2 * BITS_PER_UNIT) < DECL_ALIGN (fndecl) = 2 * BITS_PER_UNIT; --- > if !(access_flags & ACC_STATIC) > DECL_ALIGN (fndecl) = MAX (minimum_function_boundary (decl), DECL_ALIGN (fndecl));