diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-24 18:32:48 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-24 18:32:48 +0000 |
commit | d94a3bb75943d7dec3b25b8baf496161654a0abf (patch) | |
tree | aef27a7a65a4638abb1d5356e2275abff2db0140 /gcc/cp/method.c | |
parent | f38e9908a187124e506ee74ec2e4dc9dd7669d65 (diff) | |
download | ppe42-gcc-d94a3bb75943d7dec3b25b8baf496161654a0abf.tar.gz ppe42-gcc-d94a3bb75943d7dec3b25b8baf496161654a0abf.zip |
* method.c (implicitly_declare_fn): Increase alignment if member
function pointer format requires it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126884 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r-- | gcc/cp/method.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 03f49088451..543bb5fa12d 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1078,6 +1078,14 @@ implicitly_declare_fn (special_function_kind kind, tree type, bool const_p) DECL_ASSIGNMENT_OPERATOR_P (fn) = 1; SET_OVERLOADED_OPERATOR_CODE (fn, NOP_EXPR); } + + /* 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 + && DECL_ALIGN (fn) < 2 * BITS_PER_UNIT) + DECL_ALIGN (fn) = 2 * BITS_PER_UNIT; + /* Create the explicit arguments. */ if (rhs_parm_type) { |