public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
@ 2013-02-07 16:13 danglin at gcc dot gnu.org
  2013-02-08  8:31 ` [Bug middle-end/56242] " rguenth at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: danglin at gcc dot gnu.org @ 2013-02-07 16:13 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56242
           Summary: [4.8 Regression]
                    libjava/classpath/gnu/javax/swing/text/html/parser/sup
                    port/textPreProcessor.java:175:0: ICE: Segmentation
                    fault
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: danglin@gcc.gnu.org
              Host: hppa2.0w-hp-hpux11.11
            Target: hppa2.0w-hp-hpux11.11
             Build: hppa2.0w-hp-hpux11.11


/opt/gnu/bin/bash ./libtool --tag=GCJ   --mode=compile
/test/gnu/gcc/objdir/./gc
c/gcj -B/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libjava/
-B/test/gnu/gcc/objd
ir/./gcc/ -B/opt/gnu/gcc/gcc-4.8/hppa2.0w-hp-hpux11.11/bin/
-B/opt/gnu/gcc/gcc-4
.8/hppa2.0w-hp-hpux11.11/lib/ -isystem
/opt/gnu/gcc/gcc-4.8/hppa2.0w-hp-hpux11.1
1/include -isystem /opt/gnu/gcc/gcc-4.8/hppa2.0w-hp-hpux11.11/sys-include   
-fc
lasspath= -fbootclasspath=../../../gcc/libjava/classpath/lib --encoding=UTF-8
-W
no-deprecated -fbootstrap-classes -g -O2  -c -o
gnu/javax/swing/text/html/parser
/support.lo
-fsource-filename=/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libjava
/classpath/lib/classes -MT gnu/javax/swing/text/html/parser/support.lo -MD -MP
-
MF gnu/javax/swing/text/html/parser/support.deps
@gnu/javax/swing/text/html/pars
er/support.list
libtool: compile:  /test/gnu/gcc/objdir/./gcc/gcj
-B/test/gnu/gcc/objdir/hppa2.0
w-hp-hpux11.11/libjava/ -B/test/gnu/gcc/objdir/./gcc/
-B/opt/gnu/gcc/gcc-4.8/hpp
a2.0w-hp-hpux11.11/bin/ -B/opt/gnu/gcc/gcc-4.8/hppa2.0w-hp-hpux11.11/lib/
-isyst
em /opt/gnu/gcc/gcc-4.8/hppa2.0w-hp-hpux11.11/include -isystem
/opt/gnu/gcc/gcc-
4.8/hppa2.0w-hp-hpux11.11/sys-include -fclasspath=
-fbootclasspath=../../../gcc/
libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g
-O
2 -c
-fsource-filename=/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libjava/classp
ath/lib/classes -MT gnu/javax/swing/text/html/parser/support.lo -MD -MP -MF
gnu/
javax/swing/text/html/parser/support.deps
@gnu/javax/swing/text/html/parser/supp
ort.list  -fPIC -o gnu/javax/swing/text/html/parser/.libs/support.o
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:
In class 'gnu.javax.swing.text.html.parser.support.textPreProcessor':
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:
In method
'gnu.javax.swing.text.html.parser.support.textPreProcessor.preprocessPreformatted(java.lang.StringBuffer)':
In file included from
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java:104:0,
                 from
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java:111,
                 from
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/Parser.java:1530,
                 from
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/Parser.java:248,
                 from
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/Parser.java:137,
                 from <built-in>:12:
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0:
internal compiler error: Segmentation fault
       return toCharArray(a_text);
 ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [gnu/javax/swing/text/html/parser/support.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libjava'
make[2]: *** [all-recursive] Error 1

Starting program: /test/gnu/gcc/objdir/gcc/jc1 /var/tmp//cckrnrz2jx
-fuse-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions
-fkeep-inline-functions -quiet -dumpbase cckrnrz2jx -auxbase-strip
gnu/javax/swing/text/html/parser/.libs/support.o -g -O2 -Wno-deprecated
-version -ffilelist-file -fencoding=UTF-8 -fbootstrap-classes
-fsource-filename=/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libjava/classpath/lib/classes
-fPIC -fbootclasspath=./:../../../gcc/libjava/classpath/lib/ -faux-classpath
cckrnrz2jx.zip -MD_ -MT gnu/javax/swing/text/html/parser/support.lo -MF
gnu/javax/swing/text/html/parser/support.deps -o cckrnrz2jx.s
warning: Private mapping of shared library text was not specified
by the executable; setting a breakpoint in a shared library which
is not privately mapped will not work.  See the HP-UX 11i v3 chatr
manpage for methods to privately map shared library text.
GNU Java (GCC) version 4.8.0 20130206 (experimental) [trunk revision 195811]
(hppa2.0w-hp-hpux11.11)
        compiled by GNU C version 4.8.0 20130206 (experimental) [trunk revision
195811], GMP version 5.0.5, MPFR version 3.1.1-p2, MPC version 1.0
warning: MPFR header version 3.1.1-p2 differs from library version 3.0.1-p4.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Java (GCC) version 4.8.0 20130206 (experimental) [trunk revision 195811]
(hppa2.0w-hp-hpux11.11)
        compiled by GNU C version 4.8.0 20130206 (experimental) [trunk revision
195811], GMP version 5.0.5, MPFR version 3.1.1-p2, MPC version 1.0
warning: MPFR header version 3.1.1-p2 differs from library version 3.0.1-p4.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Class path starts here:
    cckrnrz2jx.zip/ (zip)
    ./ (system)
    ../../../gcc/libjava/classpath/lib/ (system)

Program received signal SIGSEGV, Segmentation fault.
0x004fa53c in _Z26clear_hashed_info_for_insnP7rtx_def (insn=0xafafafaf)
    at ../../gcc/gcc/resource.c:1262
1262          for (tinfo = target_hash_table[INSN_UID (insn) %
TARGET_HASH_PRIME];
(gdb) bt
#0  0x004fa53c in _Z26clear_hashed_info_for_insnP7rtx_def (insn=0xafafafaf)
    at ../../gcc/gcc/resource.c:1262
#1  0x004f36a0 in _ZL17add_to_delay_listP7rtx_defS0_.part.8 (insn=0xafafafaf)
    at ../../gcc/gcc/reorg.c:602
#2  0x004f36d8 in _ZL17add_to_delay_listP7rtx_defS0_ (insn=0xafafafaf,
    delay_list=0x7aa15670) at ../../gcc/gcc/reorg.c:608
#3  0x004f36d8 in _ZL17add_to_delay_listP7rtx_defS0_ (insn=0xafafafaf,
    delay_list=0x7aa15660) at ../../gcc/gcc/reorg.c:608
#4  0x004f3794 in _ZL22delete_from_delay_slotP7rtx_def (insn=0x7aaa82f8)
    at ../../gcc/gcc/reorg.c:644
#5  0x004f6a3c in _Z12dbr_scheduleP7rtx_def (first=0x7ac17ca0)
    at ../../gcc/gcc/reorg.c:3269
#6  0x004f7f08 in _ZL26rest_of_handle_delay_slotsv ()
    at ../../gcc/gcc/reorg.c:3891
#7  0x00498cd4 in _Z16execute_one_passP8opt_pass (
    pass=0x4005b0b0 <pass_delay_slots>) at ../../gcc/gcc/passes.c:2333
#8  0x004990e8 in _Z17execute_pass_listP8opt_pass (
    pass=0x4005b0b0 <pass_delay_slots>) at ../../gcc/gcc/passes.c:2381
#9  0x00499100 in _Z17execute_pass_listP8opt_pass (
    pass=0x40054240 <pass_postreload>) at ../../gcc/gcc/passes.c:2382
#10 0x00499100 in _Z17execute_pass_listP8opt_pass (
    pass=0x40054278 <pass_rest_of_compilation>) at ../../gcc/gcc/passes.c:2382
#11 0x001740f8 in _ZL15expand_functionP11cgraph_node (node=0x7acdf930)
---Type <return> to continue, or q <return> to quit---
    at ../../gcc/gcc/cgraphunit.c:1640
#12 0x00176124 in _Z7compilev () at ../../gcc/gcc/cgraphunit.c:1744
#13 0x00176b9c in _Z25finalize_compilation_unitv ()
    at ../../gcc/gcc/cgraphunit.c:2119
#14 0x0040dd40 in _Z25write_global_declarationsv ()
    at ../../gcc/gcc/langhooks.c:322
#15 0x0005f9d0 in _Z18java_write_globalsv ()
    at ../../gcc/gcc/java/class.c:3269
#16 0x00566498 in _ZL12compile_filev () at ../../gcc/gcc/toplev.c:557
#17 0x00568a98 in _Z11toplev_mainiPPc (argc=0, argv=0x0)
    at ../../gcc/gcc/toplev.c:1876
#18 0x00851980 in main (argc=-1347440721, argv=0x0) at ../../gcc/gcc/main.c:36

Breakpoint 1, _ZL22delete_from_delay_slotP7rtx_def (
    insn=0x400f6fb4 <num_filled_delays>) at ../../gcc/gcc/reorg.c:628
628       for (trial = insn;
(gdb) p debug_rtx_list ($r26, -5)
(insn 427 464 428 (use (insn 11 151 152 (set (reg:SI 7 %r7 [orig:129 D.12038 ]
[129])
                (reg:SI 5 %r5 [orig:132 ivtmp.903 ] [132])) 40 {*pa.md:2211}
             (nil))) -1
     (nil))

(insn 428 427 153 (sequence [
            (jump_insn:TI 151 427 11 (set (pc)
                    (if_then_else (eq (reg:SI 28 %r28 [orig:123 D.12040+-2 ]
[123])
                            (const_int 10 [0xa]))
                        (label_ref:SI 165)
                        (pc)))
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:162
28 {*pa.md:1439}
                 (expr_list:REG_DEAD (reg:SI 28 %r28 [orig:123 D.12040+-2 ]
[123])
                    (expr_list:REG_BR_PROB (const_int 2800 [0xaf0])
                        (nil)))
             -> 165)
            (insn 11 151 152 (set (reg:SI 7 %r7 [orig:129 D.12038 ] [129])
                    (reg:SI 5 %r5 [orig:132 ivtmp.903 ] [132])) 40
{*pa.md:2211}
                 (nil))
        ])
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:162
-1
     (nil))

(note 153 428 152 [bb 19] NOTE_INSN_BASIC_BLOCK)

(note 152 153 276 19 ("*L$Jpc=71164") NOTE_INSN_DELETED_LABEL 395)

(insn:TI 276 152 474 (set (reg:SI 4 %r4)
        (reg:SI 19 %r19))
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:163
40 {*pa.md:2211}
     (nil))

$42 = 10

(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x004fa53c in _Z26clear_hashed_info_for_insnP7rtx_def (insn=0xafafafaf)
    at ../../gcc/gcc/resource.c:1262
1262          for (tinfo = target_hash_table[INSN_UID (insn) %
TARGET_HASH_PRIME];

Was testing a new patch but I suspect this may have been caused by

2013-02-06  Tom de Vries  <tom@codesourcery.com>

        PR rtl-optimization/56131
        * cfgrtl.c (delete_insn): Use NOTE_BASIC_BLOCK instead of
BLOCK_FOR_INSN
        to get the bb of a NOTE_INSN_BASIC_BLOCK.  Handle the case that the bb
        of the label is NULL.  Add comment.


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
@ 2013-02-08  8:31 ` rguenth at gcc dot gnu.org
  2013-02-08 11:37 ` ebotcazou at gcc dot gnu.org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-08  8:31 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vries at gcc dot gnu.org
   Target Milestone|---                         |4.8.0


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
  2013-02-08  8:31 ` [Bug middle-end/56242] " rguenth at gcc dot gnu.org
@ 2013-02-08 11:37 ` ebotcazou at gcc dot gnu.org
  2013-02-08 15:29 ` rguenth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-02-08 11:37 UTC (permalink / raw)
  To: gcc-bugs


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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2013-02-08 11:37:28 UTC ---
> Was testing a new patch but I suspect this may have been caused by
> 
> 2013-02-06  Tom de Vries  <tom@codesourcery.com>
> 
>         PR rtl-optimization/56131
>         * cfgrtl.c (delete_insn): Use NOTE_BASIC_BLOCK instead of
> BLOCK_FOR_INSN
>         to get the bb of a NOTE_INSN_BASIC_BLOCK.  Handle the case that the bb
>         of the label is NULL.  Add comment.

I guess that the NOTE_BASIC_BLOCK notes are also invalid during reorg.


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
  2013-02-08  8:31 ` [Bug middle-end/56242] " rguenth at gcc dot gnu.org
  2013-02-08 11:37 ` ebotcazou at gcc dot gnu.org
@ 2013-02-08 15:29 ` rguenth at gcc dot gnu.org
  2013-02-11  9:10 ` jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-08 15:29 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-02-08 15:29 ` rguenth at gcc dot gnu.org
@ 2013-02-11  9:10 ` jakub at gcc dot gnu.org
  2013-02-13  0:04 ` vries at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-11  9:10 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-11 09:10:12 UTC ---
I'd say if NOTE_INSN_BASIC_BLOCK has NULL BLOCK_FOR_INSN, rather than trying to
use NOTE_BASIC_BLOCK the code should just assume cfg has been freed and can't
be used.


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-02-11  9:10 ` jakub at gcc dot gnu.org
@ 2013-02-13  0:04 ` vries at gcc dot gnu.org
  2013-02-13 14:10 ` dave.anglin at bell dot net
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: vries at gcc dot gnu.org @ 2013-02-13  0:04 UTC (permalink / raw)
  To: gcc-bugs


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

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--- Comment #3 from vries at gcc dot gnu.org 2013-02-13 00:03:45 UTC ---
I don't have an hp machine to reproduce this (I've asked for access to the gcc
compile farm 2 weeks ago).

I've tried to reproduce this bug by building a cross compiler using the
hppa2.0w-unknown-linux-gnu target. I managed to build libjava, but I didn't
manage to reproduce the bug.

The thing I can see that's wrong is in NEXT_INSN (insn 11), which is note 152
but which should be note 153:
...
(insn 428 427 153 (sequence [
            (jump_insn:TI 151 427 11 (set (pc)
                    (if_then_else (eq (reg:SI 28 %r28 [orig:123 D.12040+-2 ]
[123])
                            (const_int 10 [0xa]))
                        (label_ref:SI 165)
                        (pc)))
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:162
28 {*pa.md:1439}
                 (expr_list:REG_DEAD (reg:SI 28 %r28 [orig:123 D.12040+-2 ]
[123])
                    (expr_list:REG_BR_PROB (const_int 2800 [0xaf0])
                        (nil)))
             -> 165)
            (insn 11 151 152 (set (reg:SI 7 %r7 [orig:129 D.12038 ] [129])
                    (reg:SI 5 %r5 [orig:132 ivtmp.903 ] [132])) 40
{*pa.md:2211}
                 (nil))
        ])
/test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:162
-1
     (nil))

(note 153 428 152 [bb 19] NOTE_INSN_BASIC_BLOCK)

(note 152 153 276 19 ("*L$Jpc=71164") NOTE_INSN_DELETED_LABEL 395)
...

The code that deletes undeletable labels uses reorder_insns_nobb which is
deprecated and doesn't know about SEQUENCEs:
...
/* This function is deprecated, please use sequences instead.

   Move a consecutive bunch of insns to a different place in the chain.
   The insns to be moved are those between FROM and TO.
   They are moved to a new position after the insn AFTER.
   AFTER must not be FROM or TO or any insn in between.

   This function does not know about SEQUENCEs and hence should not be
   called after delay-slot filling has been done.  */

void
reorder_insns_nobb (rtx from, rtx to, rtx after)
...

A fixup patch like this might work:
...
Index: cfgrtl.c
===================================================================
--- cfgrtl.c (revision 195874)
+++ cfgrtl.c (working copy)
@@ -119,6 +119,28 @@ can_delete_label_p (const_rtx label)
       && !in_expr_list_p (forced_labels, label));
 }

+static void
+update_next_prev_in_sequence (const_rtx insn)
+{
+  rtx seq;
+  unsigned int length;
+
+  if (insn == NULL_RTX
+      || !INSN_P (insn))
+    return;
+
+  seq = PATTERN (insn);
+  if (GET_CODE (PATTERN (seq)) != SEQUENCE)
+    return;
+
+  length = XVECLEN (seq, 0);
+  if (length == 0)
+    return;
+
+  PREV_INSN (XVECEXP (seq, 0, 0)) = PREV_INSN (insn);
+  NEXT_INSN (XVECEXP (seq, 0, length - 1)) = NEXT_INSN (insn);
+}
+
 /* Delete INSN by patching it out.  */

 void
@@ -152,6 +174,8 @@ delete_insn (rtx insn)
           || label_bb == NULL))
         {
           reorder_insns_nobb (insn, insn, bb_note);
+          update_next_prev_in_sequence (PREV_INSN (bb_note));
+          update_next_prev_in_sequence (NEXT_INSN (insn));        
           bb = NOTE_BASIC_BLOCK (bb_note);
           BB_HEAD (bb) = bb_note;
           if (BB_END (bb) == bb_note)
...


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-02-13  0:04 ` vries at gcc dot gnu.org
@ 2013-02-13 14:10 ` dave.anglin at bell dot net
  2013-02-13 15:44 ` vries at gcc dot gnu.org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: dave.anglin at bell dot net @ 2013-02-13 14:10 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from dave.anglin at bell dot net 2013-02-13 14:09:26 UTC ---
On 2013-02-12 6:03 PM, vries at gcc dot gnu.org wrote:
> I've tried to reproduce this bug by building a cross compiler using the
> hppa2.0w-unknown-linux-gnu target. I managed to build libjava, but I didn't
> manage to reproduce the bug.
Yes. it doesn't reproduce on linux.

>
> The thing I can see that's wrong is in NEXT_INSN (insn 11), which is note 152
> but which should be note 153:
> ...
> (insn 428 427 153 (sequence [
>              (jump_insn:TI 151 427 11 (set (pc)
>                      (if_then_else (eq (reg:SI 28 %r28 [orig:123 D.12040+-2 ]
> [123])
>                              (const_int 10 [0xa]))
>                          (label_ref:SI 165)
>                          (pc)))
> /test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:162
> 28 {*pa.md:1439}
>                   (expr_list:REG_DEAD (reg:SI 28 %r28 [orig:123 D.12040+-2 ]
> [123])
>                      (expr_list:REG_BR_PROB (const_int 2800 [0xaf0])
>                          (nil)))
>               -> 165)
>              (insn 11 151 152 (set (reg:SI 7 %r7 [orig:129 D.12038 ] [129])
>                      (reg:SI 5 %r5 [orig:132 ivtmp.903 ] [132])) 40
> {*pa.md:2211}
>                   (nil))
>          ])
> /test/gnu/gcc/gcc/libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:162
> -1
>       (nil))
>
> (note 153 428 152 [bb 19] NOTE_INSN_BASIC_BLOCK)
>
> (note 152 153 276 19 ("*L$Jpc=71164") NOTE_INSN_DELETED_LABEL 395)
> ...

I'll give your patch a try later today when my current build and check 
finishes.  I could give you
access to this test system if the change doesn't work out.

Thanks for looking at this bug.


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2013-02-13 14:10 ` dave.anglin at bell dot net
@ 2013-02-13 15:44 ` vries at gcc dot gnu.org
  2013-02-14  9:11 ` vries at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: vries at gcc dot gnu.org @ 2013-02-13 15:44 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from vries at gcc dot gnu.org 2013-02-13 15:44:21 UTC ---
Created attachment 29440
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29440
delete-insn-tentative-fix-PR56242.patch

> I'll give your patch a try later today when my current build and check 
> finishes.

New version of the patch, the previous one did PATTERN (PATTERN ()). I'm
bootstrapping this now on x86_64, and will test it on mips.


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2013-02-13 15:44 ` vries at gcc dot gnu.org
@ 2013-02-14  9:11 ` vries at gcc dot gnu.org
  2013-02-14 13:56 ` dave.anglin at bell dot net
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: vries at gcc dot gnu.org @ 2013-02-14  9:11 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from vries at gcc dot gnu.org 2013-02-14 09:11:06 UTC ---
> New version of the patch, the previous one did PATTERN (PATTERN ()). I'm
> bootstrapping this now on x86_64, and will test it on mips.

Bootstrapped and reg-tested on x86_64. Build and reg-tested on mips. No issues
found.


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2013-02-14  9:11 ` vries at gcc dot gnu.org
@ 2013-02-14 13:56 ` dave.anglin at bell dot net
  2013-02-20 14:28 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: dave.anglin at bell dot net @ 2013-02-14 13:56 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from dave.anglin at bell dot net 2013-02-14 13:56:13 UTC ---
Patch fixes ICE on hppa2.0w-hp-hpux11.11.  Testsuite running...


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2013-02-14 13:56 ` dave.anglin at bell dot net
@ 2013-02-20 14:28 ` rguenth at gcc dot gnu.org
  2013-02-20 19:07 ` law at redhat dot com
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-20 14:28 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-02-20
     Ever Confirmed|0                           |1

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-20 14:27:57 UTC ---
Any updates?


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2013-02-20 14:28 ` rguenth at gcc dot gnu.org
@ 2013-02-20 19:07 ` law at redhat dot com
  2013-02-20 19:48 ` law at redhat dot com
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: law at redhat dot com @ 2013-02-20 19:07 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Jeffrey A. Law <law at redhat dot com> 2013-02-20 19:06:53 UTC ---
Given this built & reg-tested on mips (which uses reorg) and is reported to fix
the ICE on the PA, I don't think we need to wait on the PA testing results.


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2013-02-20 19:07 ` law at redhat dot com
@ 2013-02-20 19:48 ` law at redhat dot com
  2013-02-21 10:31 ` steven at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: law at redhat dot com @ 2013-02-20 19:48 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Jeffrey A. Law <law at redhat dot com> 2013-02-20 19:47:53 UTC ---
My first thought WRT the actual patch itself is why not put the logic to fixup
the insn chain for SEQUENCEs at the end of reorder_insns_nobb?  That would
avoid similar problems for any other code that used this function after reorg.c
had started.

It also seems to me there are 4 cases that need to be fixed.

FROM is a SEQUENCE
  Need to fix PREV_INSN of the first insn in the SEQUENCE

TO is a SEQUENCE
  Need to fix NEXT_INSN of the last insn in the SEQUENCE

PREV_INSN (FROM) is a sequence
  Need to fix NEXT_INSN of the last INSN in the SEQUENCE

NEXT_INSN (TO) is a sequence
  Need to fix PREV_INSN of the first INSN in the SEQUENCE

Am I missing something here?


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2013-02-20 19:48 ` law at redhat dot com
@ 2013-02-21 10:31 ` steven at gcc dot gnu.org
  2013-02-21 10:33 ` steven at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: steven at gcc dot gnu.org @ 2013-02-21 10:31 UTC (permalink / raw)
  To: gcc-bugs


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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steven at gcc dot gnu.org

--- Comment #11 from Steven Bosscher <steven at gcc dot gnu.org> 2013-02-21 10:31:03 UTC ---
(In reply to comment #3)

> Index: cfgrtl.c
> ===================================================================
> --- cfgrtl.c (revision 195874)
> +++ cfgrtl.c (working copy)
> @@ -119,6 +119,28 @@ can_delete_label_p (const_rtx label)
>        && !in_expr_list_p (forced_labels, label));
>  }
> 
> +static void
> +update_next_prev_in_sequence (const_rtx insn)

This wouldn't belong in cfgrtl.c but in emit-rtl.c.


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2013-02-21 10:31 ` steven at gcc dot gnu.org
@ 2013-02-21 10:33 ` steven at gcc dot gnu.org
  2013-02-25 11:54 ` vries at gcc dot gnu.org
  2013-02-25 11:59 ` jakub at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: steven at gcc dot gnu.org @ 2013-02-21 10:33 UTC (permalink / raw)
  To: gcc-bugs


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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |56131

--- Comment #12 from Steven Bosscher <steven at gcc dot gnu.org> 2013-02-21 10:33:11 UTC ---
(In reply to comment #2)
> I'd say if NOTE_INSN_BASIC_BLOCK has NULL BLOCK_FOR_INSN, rather than 
> trying to use NOTE_BASIC_BLOCK the code should just assume cfg has been 
> freed and can't be used.

Right. I just added the same comment to bug 56131 and re-opened it.  This
bug 56242 is just collateral from the incorrect fix for bug 56131.


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2013-02-21 10:33 ` steven at gcc dot gnu.org
@ 2013-02-25 11:54 ` vries at gcc dot gnu.org
  2013-02-25 11:59 ` jakub at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: vries at gcc dot gnu.org @ 2013-02-25 11:54 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #13 from vries at gcc dot gnu.org 2013-02-25 11:53:55 UTC ---
PR56131 has been re-fixed, so this PR should not trigger anymore on hppa.
However, it might still trigger on picochip (see also
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56131#c18).


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

* [Bug middle-end/56242] [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault
  2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2013-02-25 11:54 ` vries at gcc dot gnu.org
@ 2013-02-25 11:59 ` jakub at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-25 11:59 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-25 11:58:41 UTC ---
Fixed.  If there is an issue on picochip, new PR should be created for that.


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

end of thread, other threads:[~2013-02-25 11:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07 16:13 [Bug middle-end/56242] New: [4.8 Regression] libjava/classpath/gnu/javax/swing/text/html/parser/support/textPreProcessor.java:175:0: ICE: Segmentation fault danglin at gcc dot gnu.org
2013-02-08  8:31 ` [Bug middle-end/56242] " rguenth at gcc dot gnu.org
2013-02-08 11:37 ` ebotcazou at gcc dot gnu.org
2013-02-08 15:29 ` rguenth at gcc dot gnu.org
2013-02-11  9:10 ` jakub at gcc dot gnu.org
2013-02-13  0:04 ` vries at gcc dot gnu.org
2013-02-13 14:10 ` dave.anglin at bell dot net
2013-02-13 15:44 ` vries at gcc dot gnu.org
2013-02-14  9:11 ` vries at gcc dot gnu.org
2013-02-14 13:56 ` dave.anglin at bell dot net
2013-02-20 14:28 ` rguenth at gcc dot gnu.org
2013-02-20 19:07 ` law at redhat dot com
2013-02-20 19:48 ` law at redhat dot com
2013-02-21 10:31 ` steven at gcc dot gnu.org
2013-02-21 10:33 ` steven at gcc dot gnu.org
2013-02-25 11:54 ` vries at gcc dot gnu.org
2013-02-25 11:59 ` jakub at gcc dot gnu.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).