aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2002-10-02 18:46:45 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2002-10-02 18:46:45 +0000
commitf963b5d977a838a7e219bbf7b94f22fd79058a51 (patch)
treef72d300500fae0fe8ccdc82f9dfd48580a10d90f /gcc/java
parent327d975a3af27d13a179712ed162e72e19e86b33 (diff)
downloadgcc-f963b5d977a838a7e219bbf7b94f22fd79058a51.zip
gcc-f963b5d977a838a7e219bbf7b94f22fd79058a51.tar.gz
gcc-f963b5d977a838a7e219bbf7b94f22fd79058a51.tar.bz2
re PR rtl-optimization/6627 (-fno-align-functions regression from 2.95)
PR optimization/6627 * toplev.c (force_align_functions_log): New global variable. * flags.h (force_align_functions_log): Add extern prototype. * varasm.c (assemble_start_function): Use it to force minimum function alignment. * config/i386/i386.h (FUNCTION_BOUNDARY): Set the correct minimum function alignment to one byte. (TARGET_PTRMEMFUNC_VBIT_LOCATION): Store the virtual bit in the least significant bit of vtable member function pointers. * tree.h (enum ptrmemfunc_vbit_where_t): Move definition to here from cp/cp-tree.h. * cp/cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition from here, and move it to tree.h. * cp/decl.c (cxx_init_decl_processing): If storing the vbit in function pointers, ensure that force_align_functions_log is atleast one. * java/lang.c (java_init): If storing the vbit in function pointers, ensure that force_align_functions_log is atleast one to aid compatability with g++ vtables. From-SVN: r57745
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/lang.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 07c53ec..1c1c1d0 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,10 @@
+2002-10-02 Roger Sayle <roger@eyesopen.com>
+
+ PR optimization/6627
+ * lang.c (java_init): If storing the vbit in function
+ pointers, ensure that force_align_functions_log is atleast
+ one to aid compatability with g++ vtables.
+
2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
* jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index c6fbb44..706b4f1 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -516,6 +516,13 @@ java_init (filename)
if (flag_inline_functions)
flag_inline_trees = 1;
+ /* Force minimum function alignment if g++ uses the least significant
+ bit of function pointers to store the virtual bit. This is required
+ to keep vtables compatible. */
+ if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn
+ && force_align_functions_log < 1)
+ force_align_functions_log = 1;
+
/* Open input file. */
if (filename == 0 || !strcmp (filename, "-"))