For PR java/7483:
authorJesse Rosenstock <jmr@fulcrummicro.com>
Tue, 13 Aug 2002 22:29:23 +0000 (22:29 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 13 Aug 2002 22:29:23 +0000 (22:29 +0000)
2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>

For PR java/7483:
* parse.y (build_assertion): Invert return from
desiredAssertionStatus.

From-SVN: r56264

gcc/java/ChangeLog
gcc/java/parse.y

index 2803888..da858f2 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
+
+       For PR java/7483:
+       * parse.y (build_assertion): Invert return from
+       desiredAssertionStatus.
+
 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
 
        * jcf-write.c (get_access_flags): Return correct access flags for 
index dac6602..2a581a1 100644 (file)
@@ -15353,6 +15353,12 @@ build_assertion (location, condition, value)
       call = build (CALL_EXPR, NULL_TREE, id, NULL_TREE, NULL_TREE);
       call = make_qualified_primary (classdollar, call, location);
       TREE_SIDE_EFFECTS (call) = 1;
+
+      /* Invert to obtain !CLASS.desiredAssertionStatus().  This may
+        seem odd, but we do it to generate code identical to that of
+        the JDK.  */
+      call = build1 (TRUTH_NOT_EXPR, NULL_TREE, call);
+      TREE_SIDE_EFFECTS (call) = 1;
       DECL_INITIAL (field) = call;
 
       /* Record the initializer in the initializer statement list.  */