summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorJörg Budischewski <jbu@openoffice.org>2002-08-13 15:12:55 +0000
committerJörg Budischewski <jbu@openoffice.org>2002-08-13 15:12:55 +0000
commit3fb1d119fc0276c6822e1789a3d2f4c4c821eb6a (patch)
tree4de4bd3af1cc286eb06b6f8be63efe6af27b636d /stoc
parent952c06b02bbbbc98bb9a779a1700331993abefeb (diff)
#101225# disabled code optimization for C52 to workaround CC code generation bug
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/javavm/javavm.cxx46
-rw-r--r--stoc/source/javavm/makefile.mk12
2 files changed, 54 insertions, 4 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index a105e3dcdfac..26a600a9e52b 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: javavm.cxx,v $
*
- * $Revision: 1.39 $
+ * $Revision: 1.40 $
*
- * last change: $Author: jl $ $Date: 2002-08-12 10:46:10 $
+ * last change: $Author: jbu $ $Date: 2002-08-13 16:12:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,6 +59,48 @@
*
************************************************************************/
+/** Code generation bug within Sun CC 5.2 on solaris sparc
+ Please check the following code against your compiler version before enabling
+ the optimization (when the program runs correct, it should print
+ 1
+ 2
+ ), otherwise nothing. The bug has crashed the
+ initVMConfiguration function, which can be found in this file.
+
+#include <stdio.h>
+
+static void b() {};
+struct E { ~E(){ b(); } };
+
+void a()
+{
+ throw 42;
+}
+
+
+int main( int argc, char * argv[])
+{
+ E e1;
+ try
+ {
+ a();
+ }
+ catch( int i )
+ {
+ }
+ try
+ {
+ // this output never appears with CC -O test.cxx
+ fprintf( stderr,"1\n" );
+ }
+ catch( E & e )
+ {
+ }
+ // this output never appears with CC -O test.cxx
+ fprintf( stderr, "2\n" );
+}
+*/
+
#ifdef UNX
#include <signal.h>
#endif
diff --git a/stoc/source/javavm/makefile.mk b/stoc/source/javavm/makefile.mk
index d14104da033c..7b289a076134 100644
--- a/stoc/source/javavm/makefile.mk
+++ b/stoc/source/javavm/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.13 $
+# $Revision: 1.14 $
#
-# last change: $Author: jl $ $Date: 2002-07-23 14:07:24 $
+# last change: $Author: jbu $ $Date: 2002-08-13 16:12:55 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -89,6 +89,14 @@ SLOFILES= \
$(SLO)$/jvmargs.obj \
$(SLO)$/interact.obj
+.IF "$(COM)"=="C52"
+# Code generation bug in conjunction with exception handling
+# You can find a codesample in javavm.cxx in a comment
+# at the top of the file
+NOOPTFILES= \
+ $(SLO)$/javavm.obj
+.ENDIF # "$(COM)"=="C52"
+
SHL1TARGET= $(TARGET)
SHL1VERSIONMAP=$(TARGET).map
SHL1STDLIBS= \