aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorChristian Bruel <christian.bruel@st.com>2015-10-26 10:50:37 +0100
committerChristian Bruel <chrbr@gcc.gnu.org>2015-10-26 10:50:37 +0100
commitc1fffdf1fb2ebce24620195c4add32eb90daa598 (patch)
tree90a790213de81ca57c7114076a08cb59d61c9df3 /gcc/cp/decl.c
parent5929c659186adc165b6cc32aab2890a1629d667a (diff)
downloadgcc-c1fffdf1fb2ebce24620195c4add32eb90daa598.zip
gcc-c1fffdf1fb2ebce24620195c4add32eb90daa598.tar.gz
gcc-c1fffdf1fb2ebce24620195c4add32eb90daa598.tar.bz2
function.h (MINIMUM_METHOD_BOUNDARY): New macro.
2015-10-26 Christian Bruel <christian.bruel@st.com> * function.h (MINIMUM_METHOD_BOUNDARY): New macro. * cp/decl.c (grokfndecl): Set DECL_ALIGN with MINIMUM_METHOD_BOUNDARY. * cp/method.c (implicitly_declare_fn): Likewise. * cp/lambda.c (maybe_add_lambda_conv_op): Likewise. Remove VBIT setting. * java/class.c (add_method_1): Likewise. From-SVN: r229313
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 50bb39c..2fb923f 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -7829,6 +7829,9 @@ grokfndecl (tree ctype,
parm = build_this_parm (type, quals);
DECL_CHAIN (parm) = parms;
parms = parm;
+
+ /* Allocate space to hold the vptr bit if needed. */
+ DECL_ALIGN (decl) = MINIMUM_METHOD_BOUNDARY;
}
DECL_ARGUMENTS (decl) = parms;
for (t = parms; t; t = DECL_CHAIN (t))
@@ -7852,14 +7855,6 @@ grokfndecl (tree ctype,
break;
}
- /* If pointers to member functions use the least significant bit to
- indicate whether a function is virtual, ensure a pointer
- to this function will have that bit clear. */
- 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;
-
if (friendp
&& TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR)
{