public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12139] New: ICE in pretty-printer when dumping trees
@ 2003-09-02 21:23 jbuck at gcc dot gnu dot org
  2003-09-02 21:24 ` [Bug c++/12139] " jbuck at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jbuck at gcc dot gnu dot org @ 2003-09-02 21:23 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: ICE in pretty-printer when dumping trees
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jbuck at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu

Running the command

/gcc -S -fdump-tree-all tg.C

with the attached file gives

tg.C: In function `string fred(bool)':
tg.C:13: internal compiler error: Segmentation fault
Please submit a full bug report...

The crash is in c-pretty-print.c


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

* [Bug c++/12139] ICE in pretty-printer when dumping trees
  2003-09-02 21:23 [Bug c++/12139] New: ICE in pretty-printer when dumping trees jbuck at gcc dot gnu dot org
@ 2003-09-02 21:24 ` jbuck at gcc dot gnu dot org
  2003-09-02 21:36 ` [Bug middle-end/12139] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jbuck at gcc dot gnu dot org @ 2003-09-02 21:24 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From jbuck at gcc dot gnu dot org  2003-09-02 21:24 -------
Created an attachment (id=4687)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4687&action=view)
test case


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

* [Bug middle-end/12139] ICE in pretty-printer when dumping trees
  2003-09-02 21:23 [Bug c++/12139] New: ICE in pretty-printer when dumping trees jbuck at gcc dot gnu dot org
  2003-09-02 21:24 ` [Bug c++/12139] " jbuck at gcc dot gnu dot org
@ 2003-09-02 21:36 ` pinskia at gcc dot gnu dot org
  2003-09-02 22:49 ` dnovillo at redhat dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-02 21:36 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |middle-end
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-09-02 21:36:03
               date|                            |


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-02 21:36 -------
I think it might be fixed by <http://gcc.gnu.org/ml/gcc-patches/2003-08/msg01300.html> 
when it gets committed.  It was approved in <http://gcc.gnu.org/ml/gcc-patches/2003-08/
msg01301.html>


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

* [Bug middle-end/12139] ICE in pretty-printer when dumping trees
  2003-09-02 21:23 [Bug c++/12139] New: ICE in pretty-printer when dumping trees jbuck at gcc dot gnu dot org
  2003-09-02 21:24 ` [Bug c++/12139] " jbuck at gcc dot gnu dot org
  2003-09-02 21:36 ` [Bug middle-end/12139] " pinskia at gcc dot gnu dot org
@ 2003-09-02 22:49 ` dnovillo at redhat dot com
  2003-09-06 17:53 ` gdr at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dnovillo at redhat dot com @ 2003-09-02 22:49 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From dnovillo at redhat dot com  2003-09-02 22:49 -------
Subject: Re:  New: ICE in pretty-printer when dumping trees

On Tue, 2003-09-02 at 17:23, jbuck at gcc dot gnu dot org wrote:

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

> /gcc -S -fdump-tree-all tg.C
> 
> with the attached file gives
> 
> tg.C: In function `string fred(bool)':
> tg.C:13: internal compiler error: Segmentation fault
> Please submit a full bug report...
> 
> The crash is in c-pretty-print.c
>
This is the backtrace and a raw dump of the tree node that causes the
SEGV.  I don't know how to reproduce this in mainline, though.

$ gdb --args ../cc1plus -O2 -fdump-tree-all jbuck.C
GNU gdb Red Hat Linux (5.3.90-0.20030710.3rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(gdb) run
Starting program: /notnfs/dnovillo/BLD-tree-ssa-native.tobiano/gcc/cc1plus -O2 -fdump-tree-all jbuck.C
 string fred(bool)

Program received signal SIGSEGV, Segmentation fault.
0x08170eaa in pp_c_primary_expression (ppi=0x85ba400, e=0x0) at /home/dnovillo/tree-ssa/src/gcc/c-pretty-print.c:878
878           e = DECL_NAME (e);
(gdb) bt
#0  0x08170eaa in pp_c_primary_expression (ppi=0x85ba400, e=0x0) at /home/dnovillo/tree-ssa/src/gcc/c-pretty-print.c:878
#1  0x081710ed in pp_c_primary_expression (ppi=0x85ba400, e=0x55257fc8) at /home/dnovillo/tree-ssa/src/gcc/c-pretty-print.c:903
#2  0x08173c98 in pp_c_statement (ppi=0x85ba400, stmt=0x55223560) at /home/dnovillo/tree-ssa/src/gcc/c-pretty-print.c:1825
#3  0x08174a9c in pp_c_statement (ppi=0x85ba400, stmt=0x5527eea8) at /home/dnovillo/tree-ssa/src/gcc/c-pretty-print.c:1690
#4  0x08174a9c in pp_c_statement (ppi=0x85ba400, stmt=0x5527e8f8) at /home/dnovillo/tree-ssa/src/gcc/c-pretty-print.c:1690
#5  0x08175ce5 in print_c_tree (file=0x91d72c0, t=0x5527e8a4) at /home/dnovillo/tree-ssa/src/gcc/c-pretty-print.c:1956
#6  0x0817c2cd in c_genericize (fndecl=0x55283150) at /home/dnovillo/tree-ssa/src/gcc/c-simplify.c:152
#7  0x080831a8 in finish_function (flags=0) at /home/dnovillo/tree-ssa/src/gcc/cp/decl.c:14143
#8  0x080f9512 in cp_parser_function_definition_after_declarator (parser=0x55000840, inline_p=false) at /home/dnovillo/tree-ssa/src/gcc/cp/parser.c:13503
#9  0x080f9492 in cp_parser_function_definition_from_specifiers_and_declarator (parser=0x55000840, decl_specifiers=0x22, attributes=0x22, declarator=0x22)
    at /home/dnovillo/tree-ssa/src/gcc/cp/parser.c:13445
#10 0x080f411b in cp_parser_init_declarator (parser=0x55000840, decl_specifiers=0x5527e754, prefix_attributes=0x0, function_definition_allowed_p=true, member_p=false,
    declares_class_or_enum=34, function_definition_p=0xfef37813) at /home/dnovillo/tree-ssa/src/gcc/cp/parser.c:9283
#11 0x080f0f90 in cp_parser_simple_declaration (parser=0x55000840, function_definition_allowed_p=true) at /home/dnovillo/tree-ssa/src/gcc/cp/parser.c:6131
#12 0x080f0e24 in cp_parser_block_declaration (parser=0x55000840, statement_p=false) at /home/dnovillo/tree-ssa/src/gcc/cp/parser.c:6047
#13 0x080f0cdc in cp_parser_declaration (parser=0x55000840) at /home/dnovillo/tree-ssa/src/gcc/cp/parser.c:5967
#14 0x080f0bac in cp_parser_declaration_seq_opt (parser=0x55000840) at /home/dnovillo/tree-ssa/src/gcc/cp/parser.c:5876
#15 0x080ed2e2 in cp_parser_translation_unit (parser=0x55000840) at /home/dnovillo/tree-ssa/src/gcc/cp/parser.c:2160
#16 0x080fa881 in c_parse_file () at /home/dnovillo/tree-ssa/src/gcc/cp/parser.c:14388
#17 0x0817848b in c_common_parse_file (set_yydebug=34) at /home/dnovillo/tree-ssa/src/gcc/c-opts.c:1201
#18 0x084114ab in compile_file () at /home/dnovillo/tree-ssa/src/gcc/toplev.c:1774
#19 0x08415d6a in do_compile () at /home/dnovillo/tree-ssa/src/gcc/toplev.c:4468
#20 0x08415e7d in toplev_main (argc=34, argv=0xfef37a14) at /home/dnovillo/tree-ssa/src/gcc/toplev.c:4508
#21 0x0818572b in main (argc=34, argv=0x22) at /home/dnovillo/tree-ssa/src/gcc/main.c:35
(gdb) up
#1  0x081710ed in pp_c_primary_expression (ppi=0x85ba400, e=0x55257fc8) at /home/dnovillo/tree-ssa/src/gcc/c-pretty-print.c:903
903           pp_primary_expression (ppi, TREE_OPERAND (e, 0));
(gdb) pt e
 <target_expr 0x55257fc8
    type <record_type 0x55281620 string addressable needs-constructing type_1 type_2 type_4 type_5 BLK
        size <integer_cst 0x552211dc constant 8>
        unit size <integer_cst 0x55221038 constant 1>
        align 8 symtab 0 alias set -1
        fields <type_decl 0x55281850 string type <record_type 0x55281620 string>
            nonlocal decl_4 VOID file jbuck.C line 2
            align 1 context <record_type 0x55281620 string>

            jbuck.C:2>
       needs-constructor needs-destructor ~X() X() X(constX&) this=(X&) n_parents 0 use_template=0 interface-unknown
        member-functions <tree_vec 0x550008c0
            elt 0 <overload 0x5527e2d8>
            elt 1 <function_decl 0x55282150 string>
            elt 2 <function_decl 0x55281f50 operator=>
            elt 3 <overload 0x5527e594>
            elt 4 <overload 0x5527e55c>
            elt 5 <function_decl 0x55282770 __comp_dtor>
            elt 6 <function_decl 0x55282930 __base_dtor>>
        pointer_to_this <pointer_type 0x55281700> chain <type_decl 0x55281770 string>>
    side-effects addressable
    arg 0 <var_decl 0x55283620 type <record_type 0x55281620 string>
        addressable BLK file jbuck.C line 15 size <integer_cst 0x552211dc 8> unit size <integer_cst 0x55221038 1>
        align 8 context <function_decl 0x55283150 fred>
        jbuck.C:15>
    arg 1 <cond_expr 0x55257f78 type <record_type 0x55281620 string>
        side-effects
        arg 0 <parm_decl 0x55283070 v type <boolean_type 0x5521e540 bool>
            unsigned used QI file jbuck.C line 14
            size <integer_cst 0x5521347c constant 8>
            unit size <integer_cst 0x55213498 constant 1>
            align 8 context <function_decl 0x55283150 fred> initial <integer_type 0x5521e2a0 int> arg-type <integer_type 0x5521e2a0 int>
            jbuck.C:14>
        arg 1 <target_expr 0x55257eb0 type <record_type 0x55281620 string>
            side-effects arg 0 <var_decl 0x55283460>
            arg 1 <aggr_init_expr 0x55257e60 type <record_type 0x55281620 string>
                side-effects
                arg 0 <addr_expr 0x5527e968 type <pointer_type 0x552833f0>
                    constant arg 0 <function_decl 0x55282cb0 foo>> arg 2 <var_decl 0x55283460>>
            arg 2 <call_expr 0x55223480 type <void_type 0x55220f50 void>
                side-effects
                arg 0 <addr_expr 0x5527ea9c type <pointer_type 0x55283540>
                    constant arg 0 <function_decl 0x55282770 __comp_dtor>>
                arg 1 <tree_list 0x5527ea64
                    value <nop_expr 0x5527ea48 type <pointer_type 0x55281700>

                        arg 0 <nop_expr 0x5527ea2c type <pointer_type 0x55281700>
                            arg 0 <addr_expr 0x5527e9bc>>>>>>
        arg 2 <target_expr 0x55257f50 type <record_type 0x55281620 string>
            side-effects arg 0 <var_decl 0x552835b0>
            arg 1 <aggr_init_expr 0x55257f00 type <record_type 0x55281620 string>
                side-effects
                arg 0 <addr_expr 0x5527ead4 type <pointer_type 0x552833f0>
                    constant arg 0 <function_decl 0x55282e70 bar>> arg 2 <var_decl 0x552835b0>>
            arg 2 <call_expr 0x552234e0 type <void_type 0x55220f50 void>
                side-effects
                arg 0 <addr_expr 0x5527ebec type <pointer_type 0x55283540>
                    constant arg 0 <function_decl 0x55282770 __comp_dtor>>
                arg 1 <tree_list 0x5527ebd0
                    value <nop_expr 0x5527ebb4 type <pointer_type 0x55281700>

                        arg 0 <nop_expr 0x5527eb98 type <pointer_type 0x55281700>
                            arg 0 <addr_expr 0x5527eb28>>>>>>>
    arg 2 <call_expr 0x55223520
        type <void_type 0x55220f50 void VOID
            align 8 symtab 0 alias set -1
            pointer_to_this <pointer_type 0x55222000>>
        side-effects
        arg 0 <addr_expr 0x5527ed3c type <pointer_type 0x55283540>
            constant arg 0 <function_decl 0x55282770 __comp_dtor>>
        arg 1 <tree_list 0x5527ed20
            value <nop_expr 0x5527ed04 type <pointer_type 0x55281700>

                arg 0 <nop_expr 0x5527ece8 type <pointer_type 0x55281700>

                    arg 0 <addr_expr 0x5527ec78 type <pointer_type 0x55281700>
                        arg 0 <var_decl 0x55283620>>>>>>>


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

* [Bug middle-end/12139] ICE in pretty-printer when dumping trees
  2003-09-02 21:23 [Bug c++/12139] New: ICE in pretty-printer when dumping trees jbuck at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2003-09-02 22:49 ` dnovillo at redhat dot com
@ 2003-09-06 17:53 ` gdr at gcc dot gnu dot org
  2003-09-06 17:54 ` gdr at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: gdr at gcc dot gnu dot org @ 2003-09-06 17:53 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


------- Additional Comments From gdr at gcc dot gnu dot org  2003-09-06 17:53 -------
Mainline has a different code pattern.  I'm pretty sure the problem does not
occur there.  To be revisited after merge from HEAD.


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

* [Bug middle-end/12139] ICE in pretty-printer when dumping trees
  2003-09-02 21:23 [Bug c++/12139] New: ICE in pretty-printer when dumping trees jbuck at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2003-09-06 17:53 ` gdr at gcc dot gnu dot org
@ 2003-09-06 17:54 ` gdr at gcc dot gnu dot org
  2003-09-09 18:06 ` dnovillo at gcc dot gnu dot org
  2003-12-09 18:20 ` dhazeghi at yahoo dot com
  6 siblings, 0 replies; 8+ messages in thread
From: gdr at gcc dot gnu dot org @ 2003-09-06 17:54 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |gdr at gcc dot gnu dot org
                   |dot org                     |
             Status|SUSPENDED                   |ASSIGNED


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

* [Bug middle-end/12139] ICE in pretty-printer when dumping trees
  2003-09-02 21:23 [Bug c++/12139] New: ICE in pretty-printer when dumping trees jbuck at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2003-09-06 17:54 ` gdr at gcc dot gnu dot org
@ 2003-09-09 18:06 ` dnovillo at gcc dot gnu dot org
  2003-12-09 18:20 ` dhazeghi at yahoo dot com
  6 siblings, 0 replies; 8+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2003-09-09 18:06 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dnovillo at gcc dot gnu dot org changed:

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


------- Additional Comments From dnovillo at gcc dot gnu dot org  2003-09-09 18:06 -------
Patch for tree-ssa at http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00547.html
(I copied gcc-bugzilla, but I may have had munged the header.  I don't see the
message attached to the case)


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

* [Bug middle-end/12139] ICE in pretty-printer when dumping trees
  2003-09-02 21:23 [Bug c++/12139] New: ICE in pretty-printer when dumping trees jbuck at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2003-09-09 18:06 ` dnovillo at gcc dot gnu dot org
@ 2003-12-09 18:20 ` dhazeghi at yahoo dot com
  6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-12-09 18:20 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |tree-ssa


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


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

end of thread, other threads:[~2003-12-09 18:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-02 21:23 [Bug c++/12139] New: ICE in pretty-printer when dumping trees jbuck at gcc dot gnu dot org
2003-09-02 21:24 ` [Bug c++/12139] " jbuck at gcc dot gnu dot org
2003-09-02 21:36 ` [Bug middle-end/12139] " pinskia at gcc dot gnu dot org
2003-09-02 22:49 ` dnovillo at redhat dot com
2003-09-06 17:53 ` gdr at gcc dot gnu dot org
2003-09-06 17:54 ` gdr at gcc dot gnu dot org
2003-09-09 18:06 ` dnovillo at gcc dot gnu dot org
2003-12-09 18:20 ` dhazeghi at yahoo dot com

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