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

Reply via email to