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

* [Bug java/16927] assert statement fails at -O1 and above
  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 ` 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
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2004-08-09  6:11 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-09 06:11:04
               date|                            |


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


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

* [Bug java/16927] [4.0 regression] assert statement fails at -O1 and above
  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 ` tromey at gcc dot gnu dot org
  2004-09-23 14:25 ` aph at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-09-20 22:20 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2004-09-20 22:20 -------
I tried this with 3.4 and didn't get a failure.
So, it is a 4.0 regression.


-- 


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


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

* [Bug java/16927] [4.0 regression] assert statement fails at -O1 and above
  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
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: aph at gcc dot gnu dot org @ 2004-09-23 14:25 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From aph at gcc dot gnu dot org  2004-09-23 14:25 -------
Mine.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |aph at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug java/16927] [4.0 regression] assert statement fails at -O1 and above
  2004-08-09  5:23 [Bug java/16927] New: assert statement fails at -O1 and above fw at deneb dot enyo dot de
                   ` (2 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-24 13:55 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-24 13:55 -------
Subject: Bug 16927

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	aph@gcc.gnu.org	2004-09-24 13:55:42

Modified files:
	libjava        : ChangeLog 
Added files:
	libjava/testsuite/libjava.compile: AssertBug.java 

Log message:
	2004-09-24  Andrew Haley  <aph@redhat.com>
	
	PR java/16927
	* testsuite/libjava.compile/AssertBug.java: New file.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3086&r2=1.3087
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.compile/AssertBug.java.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug java/16927] [4.0 regression] assert statement fails at -O1 and above
  2004-08-09  5:23 [Bug java/16927] New: assert statement fails at -O1 and above fw at deneb dot enyo dot de
                   ` (3 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-24 13:57 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-24 13:57 -------
Subject: Bug 16927

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	aph@gcc.gnu.org	2004-09-24 13:57:09

Modified files:
	gcc/java       : ChangeLog parse.y 

Log message:
	2004-09-23  Andrew Haley  <aph@redhat.com>
	
	PR java/16927:
	* parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
	COND_EXPRs.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1460&r2=1.1461
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/parse.y.diff?cvsroot=gcc&r1=1.507&r2=1.508



-- 


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


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

* [Bug java/16927] [4.0 regression] assert statement fails at -O1 and above
  2004-08-09  5:23 [Bug java/16927] New: assert statement fails at -O1 and above fw at deneb dot enyo dot de
                   ` (4 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-24 14:04 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-24 14:04 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


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).