public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/16927] New: assert statement fails at -O1 and above
@ 2004-08-09  5:23 fw at deneb dot enyo dot de
  2004-08-09  6:11 ` [Bug java/16927] " rmathew at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: fw at deneb dot enyo dot de @ 2004-08-09  5:23 UTC (permalink / raw)
  To: java-prs

The following class cannot be compiled at optimization levels -O1 and above:

public class AssertBug {
    public void bug(Integer i) {
        assert(i.intValue() == 0):
            i.toString() + "!";
    }
}

/tmp/AssertBug.java: In class `AssertBug':
/tmp/AssertBug.java: In method `AssertBug.bug(java.lang.Integer)':
/tmp/AssertBug.java:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The crash occurs at /home/fw/src/gnu/gcc/gcc/java/check-init.c:879:
874         case EXPR_WITH_FILE_LOCATION:
875           {
876             location_t saved_location = input_location;
877             tree saved_wfl = wfl;
878             tree body = EXPR_WFL_NODE (exp);
879             if (IS_EMPTY_STMT (body))
880               break;
881             wfl = exp;
882             input_filename = EXPR_WFL_FILENAME (exp);
883             input_line = EXPR_WFL_LINENO (exp);

The tree at exp seems to look like this:

 <expr_with_file_location 0x403e2528 side-effects tree_2 tree_5
    arg 1 <identifier_node 0x4037b118 /tmp/AssertBug.java tree_4 tree_5>
    arg 2 <tree_list 0x403db5a0
        purpose <new_class_expr 0x403e24d8 side-effects
            arg 0 <expr_with_file_location 0x4037c258
                arg 0 <identifier_node 0x4037c230 gnu.gcj.runtime.StringBuffer
tree_2>>>
        chain <tree_list 0x403db5b8
            purpose <call_expr 0x403e2500 side-effects
                arg 0 <expr_with_file_location 0x4037c208
                    arg 0 <identifier_node 0x4037c1e0 append>>
                arg 1 <tree_list 0x403db588
                    value <compound_expr 0x40329480 type <pointer_type 0x403313a0>
                        side-effects tree_6
                        arg 0 <cond_expr 0x403e2460 type <pointer_type 0x4037e0e8>
                            side-effects arg 0 <eq_expr 0x40329438> arg 1
<call_expr 0x403e2438> arg 2 <save_expr 0x403c88e0>>
                        arg 1 <save_expr 0x403c8980 type <pointer_type 0x403313a0>
                            side-effects readonly invariant arg 0 <compound_expr
0x4032945c>>>>>
            chain <tree_list 0x403db5e8
                purpose <call_expr 0x403e2550 side-effects arg 0
<expr_with_file_location 0x4037c208>
                    arg 1 <tree_list 0x403db5d0
                        value <nop_expr 0x403c89c0 type <pointer_type 0x403313a0>
                            constant invariant arg 0 <array_ref 0x403e1c80>>>>>>>>

-- 
           Summary: assert statement fails at -O1 and above
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fw at deneb dot enyo dot de
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16927


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-09-24 14:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-09  5:23 [Bug java/16927] New: assert statement fails at -O1 and above fw at deneb dot enyo dot de
2004-08-09  6:11 ` [Bug java/16927] " rmathew at gcc dot gnu dot org
2004-09-20 22:20 ` [Bug java/16927] [4.0 regression] " tromey at gcc dot gnu dot org
2004-09-23 14:25 ` aph at gcc dot gnu dot org
2004-09-24 13:55 ` cvs-commit at gcc dot gnu dot org
2004-09-24 13:57 ` cvs-commit at gcc dot gnu dot org
2004-09-24 14:04 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).