public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
@ 2012-01-13 20:26 zeratul976 at hotmail dot com
  2012-01-13 20:29 ` [Bug c++/51852] " paolo.carlini at oracle dot com
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-13 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51852
           Summary: [regression] [c++11] tree check: expected tree_list,
                    have HßèMÕþÿøtxøtsø
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zeratul976@hotmail.com


A C++11 program that compiled fine with the 2011-11-05 4.7 snapshot, fails to
compile with the latest (2012-01-07) snapshot, giving the following error:

tree check: expected tree_list, have HßèMÕþÿøtxøtsø
                                                   º in
eq_local_specializations, at cp/pt.c:1687


I have tried to reduce the program to a small test case, unsuccessfully - I've
gotten to the point where almost anything I try to remove makes the error go
away (and still the program is very long and includes proprietary code so I
can't post it). 

I can keep trying, and I will post the reduced testcase if I succeed, but I
thought I'd post the bug in case someone can figure it out just from the error
message.


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
@ 2012-01-13 20:29 ` paolo.carlini at oracle dot com
  2012-01-14  0:54 ` redi at gcc dot gnu.org
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-13 20:29 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-01-13
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-13 20:26:13 UTC ---
Please attach a testcase, as-is the PR is invalid and will be soon closed.

In case you don't know already about it, you can help yourself with the delta
package: http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
  2012-01-13 20:29 ` [Bug c++/51852] " paolo.carlini at oracle dot com
@ 2012-01-14  0:54 ` redi at gcc dot gnu.org
  2012-01-14  7:49 ` zeratul976 at hotmail dot com
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-14  0:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-14 00:36:19 UTC ---
surely this is obvious, don't HßèMÕþÿøtxøtsø before you txøtsø  ;)

you could also try building with --enable-checking=valgrind or run cc1plus
under gdb and provide a stack trace and the values of some local variables at
the point it prints garbage - that might give more clues about the problem.


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
  2012-01-13 20:29 ` [Bug c++/51852] " paolo.carlini at oracle dot com
  2012-01-14  0:54 ` redi at gcc dot gnu.org
@ 2012-01-14  7:49 ` zeratul976 at hotmail dot com
  2012-01-14  7:56 ` pinskia at gcc dot gnu.org
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-14  7:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-14 07:11:43 UTC ---
Here is stack trace of cc1plus at the point where it prints garbage:

#0  tree_check_failed (node=0x7fffdc568b40, file=0xf8f214
"../../src/gcc/cp/pt.c", line=1687, function=0xf94cd0
"eq_local_specializations") at ../../src/gcc/tree.c:8822
#1  0x0000000000533f71 in eq_local_specializations (p1=Unhandled dwarf
expression opcode 0xf3
) at ../../src/gcc/cp/pt.c:1687
#2  eq_local_specializations (p1=Unhandled dwarf expression opcode 0xf3
) at ../../src/gcc/cp/pt.c:1685
#3  0x0000000000f7aa4b in htab_find_with_hash (htab=0x2305090,
element=0x7fffede2f908, hash=4256980769) at ../../src/libiberty/hashtab.c:606
#4  0x00000000005310b5 in retrieve_local_specialization (tmpl=0x7fffede2f908)
at ../../src/gcc/cp/pt.c:1087
#5  0x0000000000562d1e in tsubst_decl (t=0x7fffede2f908, args=0x7fffd78a55a0,
complain=3) at ../../src/gcc/cp/pt.c:10396
#6  0x000000000055ad35 in tsubst (t=0x7fffede2f908, args=0x7fffd78a55a0,
complain=3, in_decl=Unhandled dwarf expression opcode 0xf3
) at ../../src/gcc/cp/pt.c:11114
#7  tsubst (t=0x7fffede2f908, args=0x7fffd78a55a0, complain=3,
in_decl=Unhandled dwarf expression opcode 0xf3
) at ../../src/gcc/cp/pt.c:11099
#8  0x00000000005625de in tsubst_decl (t=Unhandled dwarf expression opcode 0xf3
) at ../../src/gcc/cp/pt.c:10490
#9  0x000000000055ad35 in tsubst (t=0x7fffede2f990, args=0x7fffd78a55a0,
complain=3, in_decl=Unhandled dwarf expression opcode 0xf3
) at ../../src/gcc/cp/pt.c:11114
#10 tsubst (t=0x7fffede2f990, args=0x7fffd78a55a0, complain=3,
in_decl=Unhandled dwarf expression opcode 0xf3
) at ../../src/gcc/cp/pt.c:11099
#11 0x000000000057ea8e in instantiate_decl (d=0x7fffd7c8ac00, defer_ok=<value
optimized out>, expl_inst_class_mem_p=false) at ../../src/gcc/cp/pt.c:18534
#12 0x00000000005878cc in instantiate_pending_templates (retries=Unhandled
dwarf expression opcode 0xf3
) at ../../src/gcc/cp/pt.c:18828
#13 0x00000000005bebf4 in cp_write_global_declarations () at
../../src/gcc/cp/decl2.c:3763
#14 0x0000000000a3b7cc in compile_file (argc=36, argv=0x7fffffffe268) at
../../src/gcc/toplev.c:573
#15 do_compile (argc=36, argv=0x7fffffffe268) at ../../src/gcc/toplev.c:1938
#16 toplev_main (argc=36, argv=0x7fffffffe268) at ../../src/gcc/toplev.c:2014
#17 0x00007ffff6f06c4d in __libc_start_main () from /lib/libc.so.6
#18 0x00000000004e3921 in _start ()

The message "Unhandled dwarf expression opcode 0xf3" stands out - does this
help diagnose the problem?

I can give values of local variables too if you tell me which ones.


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (2 preceding siblings ...)
  2012-01-14  7:49 ` zeratul976 at hotmail dot com
@ 2012-01-14  7:56 ` pinskia at gcc dot gnu.org
  2012-01-14  8:12 ` zeratul976 at hotmail dot com
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-14  7:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-14 07:20:06 UTC ---
>The message "Unhandled dwarf expression opcode 0xf3" stands out 
That just means the version of gdb you are using does not understand the dwarf2
extensions that GCC is emitting.

We really need a preprocessed source to figure out what is going on here.  Have
you looked into using something like delta? 
http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (3 preceding siblings ...)
  2012-01-14  7:56 ` pinskia at gcc dot gnu.org
@ 2012-01-14  8:12 ` zeratul976 at hotmail dot com
  2012-01-14  8:14 ` zeratul976 at hotmail dot com
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-14  8:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-14 07:55:51 UTC ---
(In reply to comment #4)
> >The message "Unhandled dwarf expression opcode 0xf3" stands out 
> That just means the version of gdb you are using does not understand the dwarf2
> extensions that GCC is emitting.
> 
> We really need a preprocessed source to figure out what is going on here.  Have
> you looked into using something like delta? 
> http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction

I can't even get a preprocessed source... when I preprocess the test case first
and then compile it, the error goes away. I only get the error if I do the
preprocessing and the compilation in the same step.


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (4 preceding siblings ...)
  2012-01-14  8:12 ` zeratul976 at hotmail dot com
@ 2012-01-14  8:14 ` zeratul976 at hotmail dot com
  2012-01-14  9:56 ` zeratul976 at hotmail dot com
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-14  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-14 08:06:03 UTC ---
(In reply to comment #2)
> you could also try building with --enable-checking=valgrind

When I try to build gcc with --enable-checking=valgrind, I get the following
error:

--13242-- Warning: DWARF2 CFI reader: unhandled DW_OP_ opcode 0x2a

valgrind: m_debuginfo/readdwarf.c:2292 (copy_convert_CfiExpr_tree): Assertion
'srcix >= 0 && srcix < VG_(sizeXA)(srcxa)' failed.
==13242==    at 0x3802B1F7: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (5 preceding siblings ...)
  2012-01-14  8:14 ` zeratul976 at hotmail dot com
@ 2012-01-14  9:56 ` zeratul976 at hotmail dot com
  2012-01-14 10:02 ` zeratul976 at hotmail dot com
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-14  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-14 08:39:44 UTC ---
Created attachment 26322
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26322
valgrind output


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (6 preceding siblings ...)
  2012-01-14  9:56 ` zeratul976 at hotmail dot com
@ 2012-01-14 10:02 ` zeratul976 at hotmail dot com
  2012-01-16 10:19 ` rguenth at gcc dot gnu.org
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-14 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-14 08:40:35 UTC ---
(In reply to comment #6)
> (In reply to comment #2)
> > you could also try building with --enable-checking=valgrind
> 
> When I try to build gcc with --enable-checking=valgrind, I get the following
> error:
> 
> --13242-- Warning: DWARF2 CFI reader: unhandled DW_OP_ opcode 0x2a
> 
> valgrind: m_debuginfo/readdwarf.c:2292 (copy_convert_CfiExpr_tree): Assertion
> 'srcix >= 0 && srcix < VG_(sizeXA)(srcxa)' failed.
> ==13242==    at 0x3802B1F7: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)

I built valgrind from source and ran cc1plus under valgrind (this is what
--enable-checking=valgrind would have done, right?).

Attached is the valgrind output. Is there anything helpful in there?


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (7 preceding siblings ...)
  2012-01-14 10:02 ` zeratul976 at hotmail dot com
@ 2012-01-16 10:19 ` rguenth at gcc dot gnu.org
  2012-01-16 16:16 ` zeratul976 at hotmail dot com
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-16 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-16 10:15:55 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > >The message "Unhandled dwarf expression opcode 0xf3" stands out 
> > That just means the version of gdb you are using does not understand the dwarf2
> > extensions that GCC is emitting.
> > 
> > We really need a preprocessed source to figure out what is going on here.  Have
> > you looked into using something like delta? 
> > http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
> 
> I can't even get a preprocessed source... when I preprocess the test case first
> and then compile it, the error goes away. I only get the error if I do the
> preprocessing and the compilation in the same step.

This means you probably are using pre-comiled headers?


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (8 preceding siblings ...)
  2012-01-16 10:19 ` rguenth at gcc dot gnu.org
@ 2012-01-16 16:16 ` zeratul976 at hotmail dot com
  2012-01-26 22:36 ` zeratul976 at hotmail dot com
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-16 16:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-16 16:12:08 UTC ---
(In reply to comment #9)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > >The message "Unhandled dwarf expression opcode 0xf3" stands out 
> > > That just means the version of gdb you are using does not understand the dwarf2
> > > extensions that GCC is emitting.
> > > 
> > > We really need a preprocessed source to figure out what is going on here.  Have
> > > you looked into using something like delta? 
> > > http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
> > 
> > I can't even get a preprocessed source... when I preprocess the test case first
> > and then compile it, the error goes away. I only get the error if I do the
> > preprocessing and the compilation in the same step.
> 
> This means you probably are using pre-comiled headers?

Nope. The symptoms suggest a memory corruption issue, as the error disappears
and re-appears with small changes to the code, without any pattern.


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (9 preceding siblings ...)
  2012-01-16 16:16 ` zeratul976 at hotmail dot com
@ 2012-01-26 22:36 ` zeratul976 at hotmail dot com
  2012-01-27  5:37 ` redi at gcc dot gnu.org
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-26 22:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-26 21:48:09 UTC ---
I bisected the SVN history between the snapshot that worked and the snapshot
that gave the error - it appears at r182668.


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (10 preceding siblings ...)
  2012-01-26 22:36 ` zeratul976 at hotmail dot com
@ 2012-01-27  5:37 ` redi at gcc dot gnu.org
  2012-01-27  6:29 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-27  5:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-27 00:21:43 UTC ---
Jason, the fix for PR 51507 might have caused a memory corruption problem,
although there's no testcase to reproduce it


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (11 preceding siblings ...)
  2012-01-27  5:37 ` redi at gcc dot gnu.org
@ 2012-01-27  6:29 ` pinskia at gcc dot gnu.org
  2012-01-27  7:05 ` zeratul976 at hotmail dot com
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-27  6:29 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |GC

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-27 00:25:54 UTC ---
One thing to do is to use --param ggc-min-expand=1 --param ggc-min-heapsize=1
and try to reduce it from there.  And then when you get down use 0's instead of
1.  That should help with GC issues.


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (12 preceding siblings ...)
  2012-01-27  6:29 ` pinskia at gcc dot gnu.org
@ 2012-01-27  7:05 ` zeratul976 at hotmail dot com
  2012-01-27  7:30 ` zeratul976 at hotmail dot com
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-27  7:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-27 05:37:21 UTC ---
(In reply to comment #13)
> One thing to do is to use --param ggc-min-expand=1 --param ggc-min-heapsize=1
> and try to reduce it from there.  And then when you get down use 0's instead of
> 1.  That should help with GC issues.

The error goes away when I add those options! Is that expected?


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (13 preceding siblings ...)
  2012-01-27  7:05 ` zeratul976 at hotmail dot com
@ 2012-01-27  7:30 ` zeratul976 at hotmail dot com
  2012-01-27  8:52 ` jason at gcc dot gnu.org
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-27  7:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-27 06:29:07 UTC ---
(In reply to comment #14)
> (In reply to comment #13)
> > One thing to do is to use --param ggc-min-expand=1 --param ggc-min-heapsize=1
> > and try to reduce it from there.  And then when you get down use 0's instead of
> > 1.  That should help with GC issues.
> 
> The error goes away when I add those options! Is that expected?

On the other hand, if I add only --param gcc-min-expand=1, there error is still
there, and it seems to be much more stable now with respect to small changes in
the code. There may be hope for a reduction after all...


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (14 preceding siblings ...)
  2012-01-27  7:30 ` zeratul976 at hotmail dot com
@ 2012-01-27  8:52 ` jason at gcc dot gnu.org
  2012-01-27  9:02 ` zeratul976 at hotmail dot com
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-27  8:52 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #16 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-27 06:43:06 UTC ---
make check-g++-strict-gc finds failures on several variadic template tests,
including variadic99.C, so I don't think reducing your testcase is necessary.


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (15 preceding siblings ...)
  2012-01-27  8:52 ` jason at gcc dot gnu.org
@ 2012-01-27  9:02 ` zeratul976 at hotmail dot com
  2012-01-27  9:12 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-27  9:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-27 07:30:00 UTC ---
(In reply to comment #16)
> make check-g++-strict-gc finds failures on several variadic template tests,
> including variadic99.C, so I don't think reducing your testcase is necessary.

Already reduced it :) 
It was quite straightforward after using --param gcc-min-heapsize=0 - thanks
Andrew!


Testcase:

template <typename, typename>
class transformed {};

template <class R, class F>
transformed<F, R> transform(R r, F f);

template <typename, typename>
class joined {};

template <typename T, typename U>
joined<T, U> join(T t, U u);  

template <typename T, typename U, typename V, typename... Rest>
auto join(T t, U u, V v, Rest... rest) -> decltype(join(join(t, u), v,
rest...));  

template <typename F, typename... Rs>
auto polymorphic_transform(F f, Rs... rs) -> decltype(join((transform(rs,
f))...));

int main()
{
    polymorphic_transform(0, 0, 0);                                   
}


Compile with:

g++ -c --std=c++0x --param ggc-min-heapsize=0 test.cpp


Output:

'
tree check: expected tree_list, have Hßfè÷þÿø
ÐÝÿÿ¸l in eq_local_specializations, at cp/pt.c:1687


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (16 preceding siblings ...)
  2012-01-27  9:02 ` zeratul976 at hotmail dot com
@ 2012-01-27  9:12 ` jakub at gcc dot gnu.org
  2012-01-27  9:33 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-27  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-27 08:52:28 UTC ---
Created attachment 26476
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26476
pointer_map patch

local_specializations isn't GTY(()) marked at all and inserts GC TREE_LIST
nodes
into the hash table that aren't reachable otherwise.

The obvious fix I've tried first:
--- pt.c 2012-01-27 09:28:26.887327122 +0100
+++ pt.c 2012-01-27 09:45:01.787479945 +0100
@@ -79,7 +79,7 @@ static tree cur_stmt_expr;
 /* A map from local variable declarations in the body of the template
    presently being instantiated to the corresponding instantiated
    local variables.  */
-static htab_t local_specializations;
+static GTY ((param_is (union tree_node))) htab_t local_specializations;

 typedef struct GTY(()) spec_entry
 {

for some reason crashed elsewhere.  There is additionally the saving of the
local_specializations pointer, creating a new hash table and destroying +
restoring the pointer afterwards in two places.  Can we ggc_collect () only
when
there is at most one local_specializations array around (i.e. when
saved_local_specializations in whomever created the hash table is NULL)?

And the second question is, are the local specialization trees also reachable
from some other GC root except for local_specializations htab?  If they are
reachable from elsewhere, it would seem to me it would be much cheaper to use a
pointer_map as done in this patch (the testcase works then).


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (17 preceding siblings ...)
  2012-01-27  9:12 ` jakub at gcc dot gnu.org
@ 2012-01-27  9:33 ` jakub at gcc dot gnu.org
  2012-01-27 19:45 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-27  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-27 09:15:13 UTC ---
Actually, on a closer look, I'd say local_specializations probably should be
just local and therefore not GCed and the bug is elsewhere:

--- gcc/cp/pt.c.jj 2012-01-26 09:22:19.000000000 +0100
+++ gcc/cp/pt.c 2012-01-27 10:10:38.566458106 +0100
@@ -9582,7 +9582,7 @@ tsubst_pack_expansion (tree t, tree args
         }
     }

-  if (saved_local_specializations)
+  if (need_local_specializations)
     {
       htab_delete (local_specializations);
       local_specializations = saved_local_specializations;

With this it passes two.  Of course this can be also combined with the
pointer_map conversion patch if desired (or that part can be queued for 4.8).


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (18 preceding siblings ...)
  2012-01-27  9:33 ` jakub at gcc dot gnu.org
@ 2012-01-27 19:45 ` jakub at gcc dot gnu.org
  2012-01-27 20:25 ` zeratul976 at hotmail dot com
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-27 19:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-27 17:56:01 UTC ---
Author: jakub
Date: Fri Jan 27 17:55:55 2012
New Revision: 183637

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183637
Log:
    PR c++/51852
    * pt.c (tsubst_pack_expansion): Delete and restore
    local_specialization whenever need_local_specialization, not just
    when saved_local_specializations is non-NULL.

    * g++.dg/other/gc5.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/other/gc5.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (19 preceding siblings ...)
  2012-01-27 19:45 ` jakub at gcc dot gnu.org
@ 2012-01-27 20:25 ` zeratul976 at hotmail dot com
  2012-01-27 20:26 ` jakub at gcc dot gnu.org
  2012-01-29  0:46 ` paolo.carlini at oracle dot com
  22 siblings, 0 replies; 24+ messages in thread
From: zeratul976 at hotmail dot com @ 2012-01-27 20:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-27 19:44:54 UTC ---
The testcase and my original program now compile successfully. Thanks!


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (20 preceding siblings ...)
  2012-01-27 20:25 ` zeratul976 at hotmail dot com
@ 2012-01-27 20:26 ` jakub at gcc dot gnu.org
  2012-01-29  0:46 ` paolo.carlini at oracle dot com
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-27 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #22 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-27 20:06:18 UTC ---
Fixed.


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

* [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
  2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
                   ` (21 preceding siblings ...)
  2012-01-27 20:26 ` jakub at gcc dot gnu.org
@ 2012-01-29  0:46 ` paolo.carlini at oracle dot com
  22 siblings, 0 replies; 24+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-29  0:46 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |public at alisdairm dot net

--- Comment #23 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-28 23:46:25 UTC ---
*** Bug 52030 has been marked as a duplicate of this bug. ***


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

end of thread, other threads:[~2012-01-28 23:47 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-13 20:26 [Bug c++/51852] New: [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø zeratul976 at hotmail dot com
2012-01-13 20:29 ` [Bug c++/51852] " paolo.carlini at oracle dot com
2012-01-14  0:54 ` redi at gcc dot gnu.org
2012-01-14  7:49 ` zeratul976 at hotmail dot com
2012-01-14  7:56 ` pinskia at gcc dot gnu.org
2012-01-14  8:12 ` zeratul976 at hotmail dot com
2012-01-14  8:14 ` zeratul976 at hotmail dot com
2012-01-14  9:56 ` zeratul976 at hotmail dot com
2012-01-14 10:02 ` zeratul976 at hotmail dot com
2012-01-16 10:19 ` rguenth at gcc dot gnu.org
2012-01-16 16:16 ` zeratul976 at hotmail dot com
2012-01-26 22:36 ` zeratul976 at hotmail dot com
2012-01-27  5:37 ` redi at gcc dot gnu.org
2012-01-27  6:29 ` pinskia at gcc dot gnu.org
2012-01-27  7:05 ` zeratul976 at hotmail dot com
2012-01-27  7:30 ` zeratul976 at hotmail dot com
2012-01-27  8:52 ` jason at gcc dot gnu.org
2012-01-27  9:02 ` zeratul976 at hotmail dot com
2012-01-27  9:12 ` jakub at gcc dot gnu.org
2012-01-27  9:33 ` jakub at gcc dot gnu.org
2012-01-27 19:45 ` jakub at gcc dot gnu.org
2012-01-27 20:25 ` zeratul976 at hotmail dot com
2012-01-27 20:26 ` jakub at gcc dot gnu.org
2012-01-29  0:46 ` paolo.carlini at oracle 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).