public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40357]  New: compiler hang for C++ code
@ 2009-06-05 18:26 dcb314 at hotmail dot com
  2009-06-05 18:28 ` [Bug c++/40357] " dcb314 at hotmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2009-06-05 18:26 UTC (permalink / raw)
  To: gcc-bugs

I just tried to compile the Suse Factory package xalan-c-1.10.0-1.3
with the GNU gcc version 4.5 snapshot 20090604.

The compiler hung for over 15 minutes on an idle machine.

Preprocessed source code attached. No flags required.
Compilation using gcc 4.3.2 takes seconds.


-- 
           Summary: compiler hang for C++ code
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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


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

* [Bug c++/40357] compiler hang for C++ code
  2009-06-05 18:26 [Bug c++/40357] New: compiler hang for C++ code dcb314 at hotmail dot com
@ 2009-06-05 18:28 ` dcb314 at hotmail dot com
  2009-06-08 15:50 ` [Bug c++/40357] [4.5 Regression] " rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2009-06-05 18:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dcb314 at hotmail dot com  2009-06-05 18:28 -------
Created an attachment (id=17956)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17956&action=view)
C++source code


-- 


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


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

* [Bug c++/40357] [4.5 Regression] compiler hang for C++ code
  2009-06-05 18:26 [Bug c++/40357] New: compiler hang for C++ code dcb314 at hotmail dot com
  2009-06-05 18:28 ` [Bug c++/40357] " dcb314 at hotmail dot com
@ 2009-06-08 15:50 ` rguenth at gcc dot gnu dot org
  2009-06-22  2:18 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-08 15:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-06-08 15:50 -------
#7  0x00000000004fbcf6 in start_function (declspecs=0x7fffffffdbb0, 
    declarator=0x18717e0, attrs=0x0) at ../../../src/trunk/gcc/cp/decl.c:11884
11884     decl1 = grokdeclarator (declarator, declspecs, FUNCDEF, 1, &attrs);
(gdb) down
#6  0x00000000004e927b in grokdeclarator (declarator=0x18716a0, 
    declspecs=0x7fffffffdbb0, decl_context=NORMAL, initialized=1, 
    attrlist=0x7fffffffd9d8) at ../../../src/trunk/gcc/cp/decl.c:9403
9403            decl = grokfndecl (ctype, type, original_name, parms,
unqualified_id,
(gdb) 
#5  0x00000000004deeac in grokfndecl (ctype=0x7ffff5347780, 
    type=0x7ffff51adf00, declarator=0x7ffff6964a80, parms=0x7ffff519bcf0, 
    orig_declarator=0x7ffff6964a80, virtualp=0, flags=NO_SPECIAL, quals=0, 
    raises=0x0, check=1, friendp=0, publicp=1, inlinep=0, sfk=sfk_none, 
    funcdef_flag=1 '\1', template_count=0, in_namespace=0x0, 
    attrlist=0x7fffffffd9d8, location=11072845)
    at ../../../src/trunk/gcc/cp/decl.c:6867
6867              ok = duplicate_decls (decl, old_decl, friendp);
#4  0x00000000004c117f in duplicate_decls (newdecl=0x7ffff51a0300, 
    olddecl=0x7ffff5135900, newdecl_is_friend=0 '\0')
    at ../../../src/trunk/gcc/cp/decl.c:1694
1694          newtype = merge_types (TREE_TYPE (newdecl), TREE_TYPE (olddecl));
(gdb) 
#3  0x0000000000624c30 in merge_types (t1=0x7ffff51add80, t2=0x7ffff53b1b40)
    at ../../../src/trunk/gcc/cp/typeck.c:764
764             t3 = merge_types (t1, t2);
(gdb) 
#2  0x000000000062454f in merge_types (t1=0x7ffff51add80, t2=0x7ffff53b1b40)
    at ../../../src/trunk/gcc/cp/typeck.c:716
716             tree valtype = merge_types (TREE_TYPE (t1), TREE_TYPE (t2));
(gdb) 
#1  0x0000000000623867 in merge_types (t1=0x7ffff5187c00, t2=0x7ffff53b1a80)
    at ../../../src/trunk/gcc/cp/typeck.c:629
629       if (original_type (t1) == original_type (t2))
(gdb) 
#0  0x000000000062045d in original_type (t=0x7ffff53b1480)
    at ../../../src/trunk/gcc/cp/typeck.c:238
238              && TYPE_NAME (t) != NULL_TREE)
(gdb) finish
Run till exit from #0  0x000000000062045d in original_type (t=0x7ffff53b1480)
    at ../../../src/trunk/gcc/cp/typeck.c:238

and hangs...

233     static tree
234     original_type (tree t)
235     {
236       int quals = cp_type_quals (t);
237       while (t != error_mark_node
238              && TYPE_NAME (t) != NULL_TREE)
239         {
240           tree x = TYPE_NAME (t);
241           if (TREE_CODE (x) != TYPE_DECL)
242             break;
(gdb) l
243           x = DECL_ORIGINAL_TYPE (x);
244           if (x == NULL_TREE)
245             break;
246           t = x;
247         }

doesn't finish if DECL_ORIGINAL_TYPE (x) is the same as t.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Priority|P3                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2009-06-08 15:50:18
               date|                            |
            Summary|compiler hang for C++ code  |[4.5 Regression] compiler
                   |                            |hang for C++ code
   Target Milestone|---                         |4.5.0


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


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

* [Bug c++/40357] [4.5 Regression] compiler hang for C++ code
  2009-06-05 18:26 [Bug c++/40357] New: compiler hang for C++ code dcb314 at hotmail dot com
  2009-06-05 18:28 ` [Bug c++/40357] " dcb314 at hotmail dot com
  2009-06-08 15:50 ` [Bug c++/40357] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2009-06-22  2:18 ` pinskia at gcc dot gnu dot org
  2009-07-13 12:33 ` jason at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-06-22  2:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2009-06-22 02:18 -------
Reduced testcase:
struct XalanCProcessor
{
    typedef enum {eInvalid, eXalanSourceTree, eXercesDOM} ParseOptionType;
    ParseOptionType getParseOption(void);
};
typedef XalanCProcessor::ParseOptionType ParseOptionType;
ParseOptionType XalanCProcessor::getParseOption(void) {}


-- 


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


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

* [Bug c++/40357] [4.5 Regression] compiler hang for C++ code
  2009-06-05 18:26 [Bug c++/40357] New: compiler hang for C++ code dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2009-06-22  2:18 ` pinskia at gcc dot gnu dot org
@ 2009-07-13 12:33 ` jason at gcc dot gnu dot org
  2009-07-14 15:29 ` dodji at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-07-13 12:33 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-06-08 15:50:18         |2009-07-13 12:32:54
               date|                            |


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


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

* [Bug c++/40357] [4.5 Regression] compiler hang for C++ code
  2009-06-05 18:26 [Bug c++/40357] New: compiler hang for C++ code dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2009-07-13 12:33 ` jason at gcc dot gnu dot org
@ 2009-07-14 15:29 ` dodji at gcc dot gnu dot org
  2009-07-15  7:44 ` dcb314 at hotmail dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-07-14 15:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dodji at gcc dot gnu dot org  2009-07-14 15:29 -------
Fixed by the patch for PR debug/40705


-- 

dodji at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/40357] [4.5 Regression] compiler hang for C++ code
  2009-06-05 18:26 [Bug c++/40357] New: compiler hang for C++ code dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2009-07-14 15:29 ` dodji at gcc dot gnu dot org
@ 2009-07-15  7:44 ` dcb314 at hotmail dot com
  2009-07-15  7:51 ` jason at redhat dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2009-07-15  7:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dcb314 at hotmail dot com  2009-07-15 07:44 -------
(In reply to comment #4)
> Fixed by the patch for PR debug/40705

I don't think so. 

I tried the code on snapshot 20090709 and it still hangs.

By the way, how can a fix for a crash also fix a hang ?
I would have thought the two were mutually exclusive.


-- 

dcb314 at hotmail dot com changed:

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


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


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

* [Bug c++/40357] [4.5 Regression] compiler hang for C++ code
  2009-06-05 18:26 [Bug c++/40357] New: compiler hang for C++ code dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2009-07-15  7:44 ` dcb314 at hotmail dot com
@ 2009-07-15  7:51 ` jason at redhat dot com
  2009-07-15 11:19 ` reichelt at gcc dot gnu dot org
  2009-07-23 17:52 ` hjl at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at redhat dot com @ 2009-07-15  7:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jason at redhat dot com  2009-07-15 07:51 -------
Subject: Re:  [4.5 Regression] compiler hang for C++ code

On 07/15/2009 09:44 AM, dcb314 at hotmail dot com wrote:
> I tried the code on snapshot 20090709 and it still hangs.

The patch wasn't in that snapshot; it wasn't applied until 20090714.

> By the way, how can a fix for a crash also fix a hang ?
> I would have thought the two were mutually exclusive.

A correction for the internal representation can fix any manner of failure.


-- 


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


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

* [Bug c++/40357] [4.5 Regression] compiler hang for C++ code
  2009-06-05 18:26 [Bug c++/40357] New: compiler hang for C++ code dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2009-07-15  7:51 ` jason at redhat dot com
@ 2009-07-15 11:19 ` reichelt at gcc dot gnu dot org
  2009-07-23 17:52 ` hjl at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-07-15 11:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from reichelt at gcc dot gnu dot org  2009-07-15 11:19 -------
This is really fixed.


-- 

reichelt at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/40357] [4.5 Regression] compiler hang for C++ code
  2009-06-05 18:26 [Bug c++/40357] New: compiler hang for C++ code dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2009-07-15 11:19 ` reichelt at gcc dot gnu dot org
@ 2009-07-23 17:52 ` hjl at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-07-23 17:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from hjl at gcc dot gnu dot org  2009-07-23 17:51 -------
Subject: Bug 40357

Author: hjl
Date: Thu Jul 23 17:50:56 2009
New Revision: 150020

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150020
Log:
2009-07-23  H.J. Lu  <hongjiu.lu@intel.com>

        Backport from mainline:
        2009-07-22  Richard Guenther  <rguenther@suse.de>

        PR c++/40799
        * g++.dg/lookup/using21.C: New testcase.

        2009-07-19  Jan Hubicka  <jh@suse.cz>

        PR tree-optimization/40676
        * gcc.c-torture/compile/pr40676.c: New testcase.

        2009-07-15  Richard Guenther  <rguenther@suse.de>

        PR middle-end/40753
        * gcc.c-torture/compile/pr40753.c: New testcase.

        2009-07-14  Dodji Seketeli  <dodji@redhat.com>

        PR debug/40705
        * g++.dg/debug/dwarf2/typedef1.C: New test.

        PR c++/40357
        * g++.dg/other/typedef3.C: New test.

        2009-07-10  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/40496
        * g++.dg/opt/pr40496.C: New testcase.

        2009-07-09  Jakub Jelinek  <jakub@redhat.com>

        PR middle-end/40692
        * gcc.c-torture/compile/pr40692.c: New test.

        2009-07-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libfortran/40330
        PR libfortran/40662
        * gfortran.dg/fmt_cache_1.f: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C
      - copied unchanged from r150018,
trunk/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/lookup/using21.C
      - copied unchanged from r150018,
trunk/gcc/testsuite/g++.dg/lookup/using21.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/opt/pr40496.C
      - copied unchanged from r150018, trunk/gcc/testsuite/g++.dg/opt/pr40496.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/other/typedef3.C
      - copied unchanged from r150018,
trunk/gcc/testsuite/g++.dg/other/typedef3.C
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40676.c
      - copied unchanged from r150018,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40676.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40692.c
      - copied unchanged from r150018,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40692.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40753.c
      - copied unchanged from r150018,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40753.c
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/fmt_cache_1.f
      - copied unchanged from r150018,
trunk/gcc/testsuite/gfortran.dg/fmt_cache_1.f
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2009-07-23 17:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-05 18:26 [Bug c++/40357] New: compiler hang for C++ code dcb314 at hotmail dot com
2009-06-05 18:28 ` [Bug c++/40357] " dcb314 at hotmail dot com
2009-06-08 15:50 ` [Bug c++/40357] [4.5 Regression] " rguenth at gcc dot gnu dot org
2009-06-22  2:18 ` pinskia at gcc dot gnu dot org
2009-07-13 12:33 ` jason at gcc dot gnu dot org
2009-07-14 15:29 ` dodji at gcc dot gnu dot org
2009-07-15  7:44 ` dcb314 at hotmail dot com
2009-07-15  7:51 ` jason at redhat dot com
2009-07-15 11:19 ` reichelt at gcc dot gnu dot org
2009-07-23 17:52 ` hjl 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).