public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34850]  New: Recursive BLOCK tree
@ 2008-01-18 14:50 rguenth at gcc dot gnu dot org
  2008-01-18 14:54 ` [Bug c++/34850] " rguenth at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-18 14:50 UTC (permalink / raw)
  To: gcc-bugs

Compilation of the attached testcase hangs in 

0x000000000056aedc in cp_print_error_function (context=0x15c5a60, 
    diagnostic=0x7fff955f6c30)
    at /space/rguenther/src/svn/trunk/gcc/cp/error.c:2426
2426                      while (TREE_CODE (ao) == BLOCK &&
BLOCK_ABSTRACT_ORIGIN (ao))
2427                        ao = BLOCK_ABSTRACT_ORIGIN (ao);

because BLOCK_ABSTRACT_ORIGIN (ao) == ao.

If you build with -O2 -g.  Building without -g fixes the problem
(possibly the BLOCK is thrown away as unused).


-- 
           Summary: Recursive BLOCK tree
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


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

* [Bug c++/34850] Recursive BLOCK tree
  2008-01-18 14:50 [Bug c++/34850] New: Recursive BLOCK tree rguenth at gcc dot gnu dot org
@ 2008-01-18 14:54 ` rguenth at gcc dot gnu dot org
  2008-01-18 15:10 ` [Bug c++/34850] [4.3 Regression] Recursive BLOCK tree causes compilation to hang during diagnostics rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-18 14:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-01-18 14:44 -------
Created an attachment (id=14967)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14967&action=view)
reduced testcase


-- 


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


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

* [Bug c++/34850] [4.3 Regression] Recursive BLOCK tree causes compilation to hang during diagnostics
  2008-01-18 14:50 [Bug c++/34850] New: Recursive BLOCK tree rguenth at gcc dot gnu dot org
  2008-01-18 14:54 ` [Bug c++/34850] " rguenth at gcc dot gnu dot org
@ 2008-01-18 15:10 ` rguenth at gcc dot gnu dot org
  2008-01-18 15:27 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-18 15:10 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
            Summary|Recursive BLOCK tree        |[4.3 Regression] Recursive
                   |                            |BLOCK tree causes
                   |                            |compilation to hang during
                   |                            |diagnostics
   Target Milestone|---                         |4.3.0


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


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

* [Bug c++/34850] [4.3 Regression] Recursive BLOCK tree causes compilation to hang during diagnostics
  2008-01-18 14:50 [Bug c++/34850] New: Recursive BLOCK tree rguenth at gcc dot gnu dot org
  2008-01-18 14:54 ` [Bug c++/34850] " rguenth at gcc dot gnu dot org
  2008-01-18 15:10 ` [Bug c++/34850] [4.3 Regression] Recursive BLOCK tree causes compilation to hang during diagnostics rguenth at gcc dot gnu dot org
@ 2008-01-18 15:27 ` rguenth at gcc dot gnu dot org
  2008-01-18 15:33 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-18 15:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-01-18 14:53 -------
The recursion is created by set_block_origin_self (), called from

#0  set_block_origin_self (stmt=0x2b4ce448cd80)
    at /space/rguenther/src/svn/trunk/gcc/integrate.c:105
#1  0x000000000098ca87 in set_decl_origin_self (decl=0x2b4ce4479680)
    at /space/rguenther/src/svn/trunk/gcc/integrate.c:154
#2  0x0000000000810f41 in gen_decl_die (decl=0x2b4ce4479680, 
    context_die=0x2b4ce445e0c0)
    at /space/rguenther/src/svn/trunk/gcc/dwarf2out.c:13873
#3  0x00000000008129d3 in dwarf2out_decl (decl=0x2b4ce4479680)
    at /space/rguenther/src/svn/trunk/gcc/dwarf2out.c:14214
#4  0x00000000008880c7 in rest_of_handle_final ()
    at /space/rguenther/src/svn/trunk/gcc/final.c:4152

while we still (after that), try to emit diagnostics via

#0  0x000000000056ae92 in cp_print_error_function (context=0x15c5a60, 
    diagnostic=0x7fffc70736b0)
    at /space/rguenther/src/svn/trunk/gcc/cp/error.c:2426
#1  0x000000000056a9f4 in cp_diagnostic_starter (context=0x15c5a60, 
    diagnostic=0x7fffc70736b0)
    at /space/rguenther/src/svn/trunk/gcc/cp/error.c:2364
#2  0x00000000007e2168 in diagnostic_report_diagnostic (context=0x15c5a60, 
    diagnostic=0x7fffc70736b0)
    at /space/rguenther/src/svn/trunk/gcc/diagnostic.c:421
#3  0x00000000007e25e4 in warning (opt=0, 
    gmsgid=0x112a8e8 "%Kcall to %qs declared with attribute warning: %s")
    at /space/rguenther/src/svn/trunk/gcc/diagnostic.c:511
#4  0x0000000000866d15 in expand_expr_real_1 (exp=0x2b4ce44e5230, target=0x0, 
    tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at /space/rguenther/src/svn/trunk/gcc/expr.c:8043
#5  0x000000000085ff13 in expand_expr_real (exp=0x2b4ce44e5230, 
    target=0x2b4ce3a92400, tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at /space/rguenther/src/svn/trunk/gcc/expr.c:7094
#6  0x0000000000a95a45 in expand_expr (exp=0x2b4ce44e5230, 
    target=0x2b4ce3a92400, mode=VOIDmode, modifier=EXPAND_NORMAL)
    at /space/rguenther/src/svn/trunk/gcc/expr.h:514
#7  0x0000000000a977db in expand_expr_stmt (exp=0x2b4ce44e5230)
    at /space/rguenther/src/svn/trunk/gcc/stmt.c:1361
#8  0x0000000000fd8e9a in expand_gimple_basic_block (bb=0x2b4ce44c8f00)
    at /space/rguenther/src/svn/trunk/gcc/cfgexpand.c:1609
#9  0x0000000000fda700 in tree_expand_cfg ()
    at /space/rguenther/src/svn/trunk/gcc/cfgexpand.c:1918

thus from expanding another function.

Bummer.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-01-18 14:53:38
               date|                            |


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


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

* [Bug c++/34850] [4.3 Regression] Recursive BLOCK tree causes compilation to hang during diagnostics
  2008-01-18 14:50 [Bug c++/34850] New: Recursive BLOCK tree rguenth at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-01-18 15:27 ` rguenth at gcc dot gnu dot org
@ 2008-01-18 15:33 ` rguenth at gcc dot gnu dot org
  2008-01-18 22:03 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-18 15:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-01-18 15:09 -------
I have a patch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-01-18 14:53:38         |2008-01-18 15:09:41
               date|                            |


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


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

* [Bug c++/34850] [4.3 Regression] Recursive BLOCK tree causes compilation to hang during diagnostics
  2008-01-18 14:50 [Bug c++/34850] New: Recursive BLOCK tree rguenth at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-01-18 15:33 ` rguenth at gcc dot gnu dot org
@ 2008-01-18 22:03 ` rguenth at gcc dot gnu dot org
  2008-01-21  9:49 ` rguenth at gcc dot gnu dot org
  2008-01-21  9:55 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-18 22:03 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/34850] [4.3 Regression] Recursive BLOCK tree causes compilation to hang during diagnostics
  2008-01-18 14:50 [Bug c++/34850] New: Recursive BLOCK tree rguenth at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-01-18 22:03 ` rguenth at gcc dot gnu dot org
@ 2008-01-21  9:49 ` rguenth at gcc dot gnu dot org
  2008-01-21  9:55 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-21  9:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-01-21 09:34 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/34850] [4.3 Regression] Recursive BLOCK tree causes compilation to hang during diagnostics
  2008-01-18 14:50 [Bug c++/34850] New: Recursive BLOCK tree rguenth at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-01-21  9:49 ` rguenth at gcc dot gnu dot org
@ 2008-01-21  9:55 ` rguenth at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-21  9:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-01-21 09:35 -------
Subject: Bug 34850

Author: rguenth
Date: Mon Jan 21 09:34:19 2008
New Revision: 131690

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131690
Log:
2008-01-21  Richard Guenther  <rguenther@suse.de>

        PR c++/34850
        cp/
        * error.c (cp_print_error_function): Deal with recursive
        BLOCK trees.

        * g++.dg/torture/pr34850.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr34850.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/error.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2008-01-21  9:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-18 14:50 [Bug c++/34850] New: Recursive BLOCK tree rguenth at gcc dot gnu dot org
2008-01-18 14:54 ` [Bug c++/34850] " rguenth at gcc dot gnu dot org
2008-01-18 15:10 ` [Bug c++/34850] [4.3 Regression] Recursive BLOCK tree causes compilation to hang during diagnostics rguenth at gcc dot gnu dot org
2008-01-18 15:27 ` rguenth at gcc dot gnu dot org
2008-01-18 15:33 ` rguenth at gcc dot gnu dot org
2008-01-18 22:03 ` rguenth at gcc dot gnu dot org
2008-01-21  9:49 ` rguenth at gcc dot gnu dot org
2008-01-21  9:55 ` rguenth 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).