aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
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, "-"))