public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/16397] New: [regression 3.5] libiberty/cp-demangle.c:3923: ICE: in emit_group_load, at expr.c:1843
@ 2004-07-07  2:42 danglin at gcc dot gnu dot org
  2004-07-07  2:56 ` [Bug middle-end/16397] [3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: danglin at gcc dot gnu dot org @ 2004-07-07  2:42 UTC (permalink / raw)
  To: gcc-bugs

if [ x"-fPIC" != x ]; then \
  /xxx/gnu/gcc-3.3/objdir/gcc/xgcc -B/xxx/gnu/gcc-3.3/objdir/gcc/ -B/opt/gnu64/g
cc/gcc-3.5.0-gnu-ld/hppa64-hp-hpux11.11/bin/ -B/opt/gnu64/gcc/gcc-3.5.0-gnu-ld/h
ppa64-hp-hpux11.11/lib/ -isystem /opt/gnu64/gcc/gcc-3.5.0-gnu-ld/hppa64-hp-hpux1
1.11/include -isystem /opt/gnu64/gcc/gcc-3.5.0-gnu-ld/hppa64-hp-hpux11.11/sys-in
clude -c -DHAVE_CONFIG_H -O2 -g -O2 -I. -I../../../gcc/libiberty/../include  -W
-Wall -Wtraditional -pedantic -fPIC ../../../gcc/libiberty/cp-demangle.c -o pic/
cp-demangle.o; \
else true; fi
../../../gcc/libiberty/cp-demangle.c: In function `d_demangle':
../../../gcc/libiberty/cp-demangle.c:3923: internal compiler error: in emit_grou
p_load, at expr.c:1843
Please submit a full bug report,

The same problem previously was noted in PR 16167:

<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16167>

Breakpoint 1, emit_group_load (dst=0x800003fffe6065a0,
    orig_src=0x800003fffe883d00, type=0x0, ssize=0)
    at ../../gcc/gcc/expr.c:1843
1843                abort ();
(gdb) p debug_rtx (dst)
(parallel:TI [
        (expr_list (reg:DI 24 %r24)
            (const_int 0 [0x0]))
        (expr_list (reg:DI 23 %r23)
            (const_int 8 [0x8]))
    ])
$1 = void
(gdb) p debug_rtx (orig_src)
(const_int 192 [0xc0])
$2 = void
(gdb) bt
#0  emit_group_load (dst=0x800003fffe6065a0, orig_src=0x800003fffe883d00,
    type=0x0, ssize=0) at ../../gcc/gcc/expr.c:1843
#1  0x40000000003691fc in emit_library_call_value_1 (retval=1,
    orgfun=0x800003fffeea2a80, value=0x0, fn_type=LCT_CONST, outmode=TImode,
    nargs=2, p=0x800003fffeff31f8) at ../../gcc/gcc/calls.c:3898
#2  0x4000000000369e1c in emit_library_call_value (orgfun=Error accessing memory
 address 0x0: Invalid argument.
)
    at ../../gcc/gcc/calls.c:4131
#3  0x4000000000623900 in expand_binop (mode=TImode,
    binoptab=0x800003fffee02800, op0=0x800003fffe792fe0,
    op1=0x800003fffe883d00, target=0x800003fffe7d4560, unsignedp=1,
    methods=OPTAB_LIB_WIDEN) at ../../gcc/gcc/optabs.c:1789
#4  0x4000000000444e18 in expand_mult (mode=TImode, op0=0x800003fffe792fe0,
    op1=0x800003fffe883d00, target=0x800003fffe7d4560, unsignedp=1)
    at ../../gcc/gcc/expmed.c:2720
#5  0x40000000004868e0 in expand_expr_real_1 (exp=0x800003fffe8ede10,
    target=0x800003fffe7d4560, tmode=TImode, modifier=EXPAND_NORMAL,
    alt_rtl=0x800003fffeff2150) at ../../gcc/gcc/expr.c:7953
#6  0x40000000004707ac in expand_expr_real (exp=0x800003fffe8ede10,
    target=0x800003fffe7d4560, tmode=TImode, modifier=EXPAND_NORMAL,
    alt_rtl=0x800003fffeff2150) at ../../gcc/gcc/expr.c:6396
#7  0x400000000045f518 in store_expr (exp=0x800003fffe8ede10,
    target=0x800003fffe7d4560, want_value=0) at ../../gcc/gcc/expr.c:4218
#8  0x400000000045da90 in expand_assignment (to=0x800003fffecf5700,
---Type <return> to continue, or q <return> to quit---
    from=0x800003fffe8ede10, want_value=0) at ../../gcc/gcc/expr.c:3998
#9  0x4000000000495760 in expand_expr_real_1 (exp=0x800003fffe8d1a00,
    target=0x0, tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at ../../gcc/gcc/expr.c:8790
#10 0x400000000047074c in expand_expr_real (exp=0x800003fffe8d1a00,
    target=0x800003fffee99400, tmode=VOIDmode, modifier=EXPAND_NORMAL,
    alt_rtl=0x0) at ../../gcc/gcc/expr.c:6390
#11 0x400000000070a688 in expand_expr (exp=Error accessing memory address 0x0: 
Invalid argument.
) at expr.h:533
#12 0x4000000000712274 in expand_expr_stmt (exp=0x800003fffe8d1a00)
    at ../../gcc/gcc/stmt.c:2046
#13 0x40000000007c155c in expand_block (bb=0x800003fffe9920e0, dump_file=0x0)
    at ../../gcc/gcc/cfgexpand.c:182
#14 0x40000000007c29c0 in tree_expand_cfg () at ../../gcc/gcc/cfgexpand.c:411
#15 0x400000000021a4f4 in execute_one_pass (pass=0x8000000100001800)
    at ../../gcc/gcc/tree-optimize.c:417
#16 0x400000000021a620 in execute_pass_list (pass=0x8000000100001800)
    at ../../gcc/gcc/tree-optimize.c:442
#17 0x400000000021aa88 in tree_rest_of_compilation (
    fndecl=0x800003fffeb24000, nested_p=0 '\0')
    at ../../gcc/gcc/tree-optimize.c:518
#18 0x4000000000124cf4 in c_expand_body (fndecl=0x800003fffeb24000)
    at ../../gcc/gcc/c-decl.c:6333
#19 0x40000000007f81b0 in cgraph_expand_function (node=0x800003fffed0ce00)
---Type <return> to continue, or q <return> to quit---
    at ../../gcc/gcc/cgraphunit.c:797
#20 0x40000000007fbaac in cgraph_expand_all_functions ()
    at ../../gcc/gcc/cgraphunit.c:1669
#21 0x40000000007fc074 in cgraph_optimize ()
    at ../../gcc/gcc/cgraphunit.c:1759
#22 0x40000000001af71c in c_objc_common_finish_file ()
    at ../../gcc/gcc/c-objc-common.c:224
#23 0x40000000000f9798 in finish_file () at ../../gcc/gcc/c-lang.c:201
#24 0x400000000019d880 in c_common_parse_file (set_yydebug=Error accessing memory 
address 0x0: Invalid argument.
)
    at ../../gcc/gcc/c-opts.c:1078
#25 0x40000000007380c4 in compile_file () at ../../gcc/gcc/toplev.c:981
#26 0x400000000073b99c in do_compile () at ../../gcc/gcc/toplev.c:2066
#27 0x400000000073bab0 in toplev_main (argc=28, argv=0x800003fffeff0690)
    at ../../gcc/gcc/toplev.c:2098
#28 0x40000000001cfed4 in main (argc=Error accessing memory address 0x0: Invalid 
argument.
) at ../../gcc/gcc/main.c:35

The problem is emit_group_load can't handle be passed a CONST_INT in
orig_src with ssize == 0.  If ssize is -1, this failure doesn't occur.

There is a similar call to emit_group_load to that in calls.c in expr.c.
A value of -1 is always passed there:

  if (partial > 0 && reg != 0)
    {
      /* Handle calls that pass values in multiple non-contiguous locations.
         The Irix 6 ABI has examples of this.  */
      if (GET_CODE (reg) == PARALLEL)
        emit_group_load (reg, x, type, -1);

I think this is a bit too pesimistic.  It appears that passing the
size of the mode of x is ok except when it is 0.

-- 
           Summary: [regression 3.5] libiberty/cp-demangle.c:3923: ICE: in
                    emit_group_load, at expr.c:1843
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa64-hp-hpux11.11
  GCC host triplet: hppa64-hp-hpux11.11
GCC target triplet: hppa64-hp-hpux11.11


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


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

* [Bug middle-end/16397] [3.5 Regression] libiberty/cp-demangle.c:3923: ICE: in emit_group_load, at expr.c:1843
  2004-07-07  2:42 [Bug c/16397] New: [regression 3.5] libiberty/cp-demangle.c:3923: ICE: in emit_group_load, at expr.c:1843 danglin at gcc dot gnu dot org
@ 2004-07-07  2:56 ` pinskia at gcc dot gnu dot org
  2004-07-08  6:04 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-07  2:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-07 02:56 -------
      /* Handle calls that pass values in multiple non-contiguous
         locations.  The PA64 has examples of this for library calls.  */
      if (reg != 0 && GET_CODE (reg) == PARALLEL)
        emit_group_load (reg, val, NULL_TREE, GET_MODE_SIZE (GET_MODE (val)));
      else if (reg != 0 && partial == 0)
        emit_move_insn (reg, val);

Looks like it should look into the mode of reg instead of val.
Can you try that change?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |middle-end
           Keywords|                            |build, ice-on-valid-code
            Summary|[regression 3.5]            |[3.5 Regression]
                   |libiberty/cp-               |libiberty/cp-
                   |demangle.c:3923: ICE: in    |demangle.c:3923: ICE: in
                   |emit_group_load, at         |emit_group_load, at
                   |expr.c:1843                 |expr.c:1843
   Target Milestone|---                         |3.5.0


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


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

* [Bug middle-end/16397] [3.5 Regression] libiberty/cp-demangle.c:3923: ICE: in emit_group_load, at expr.c:1843
  2004-07-07  2:42 [Bug c/16397] New: [regression 3.5] libiberty/cp-demangle.c:3923: ICE: in emit_group_load, at expr.c:1843 danglin at gcc dot gnu dot org
  2004-07-07  2:56 ` [Bug middle-end/16397] [3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-07-08  6:04 ` pinskia at gcc dot gnu dot org
  2004-07-08  6:06 ` pinskia at gcc dot gnu dot org
  2004-07-09  3:55 ` danglin at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-08  6:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-08 06:04 -------
RTH just applied what I had recommened:
>       * calls.c (emit_library_call_value_1): Use mode of function parameter
>       rather than that of argument since constants have none.
Does this work now?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug middle-end/16397] [3.5 Regression] libiberty/cp-demangle.c:3923: ICE: in emit_group_load, at expr.c:1843
  2004-07-07  2:42 [Bug c/16397] New: [regression 3.5] libiberty/cp-demangle.c:3923: ICE: in emit_group_load, at expr.c:1843 danglin at gcc dot gnu dot org
  2004-07-07  2:56 ` [Bug middle-end/16397] [3.5 Regression] " pinskia at gcc dot gnu dot org
  2004-07-08  6:04 ` pinskia at gcc dot gnu dot org
@ 2004-07-08  6:06 ` pinskia at gcc dot gnu dot org
  2004-07-09  3:55 ` danglin at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-08  6:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-08 06:06 -------
See <http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00466.html> for the patch which RTH applied.

-- 


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


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

* [Bug middle-end/16397] [3.5 Regression] libiberty/cp-demangle.c:3923: ICE: in emit_group_load, at expr.c:1843
  2004-07-07  2:42 [Bug c/16397] New: [regression 3.5] libiberty/cp-demangle.c:3923: ICE: in emit_group_load, at expr.c:1843 danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-07-08  6:06 ` pinskia at gcc dot gnu dot org
@ 2004-07-09  3:55 ` danglin at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: danglin at gcc dot gnu dot org @ 2004-07-09  3:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From danglin at gcc dot gnu dot org  2004-07-09 03:55 -------
Fixed.


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


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


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

end of thread, other threads:[~2004-07-09  3:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-07  2:42 [Bug c/16397] New: [regression 3.5] libiberty/cp-demangle.c:3923: ICE: in emit_group_load, at expr.c:1843 danglin at gcc dot gnu dot org
2004-07-07  2:56 ` [Bug middle-end/16397] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-07-08  6:04 ` pinskia at gcc dot gnu dot org
2004-07-08  6:06 ` pinskia at gcc dot gnu dot org
2004-07-09  3:55 ` danglin 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).