[Bug c++/48029] [4.5/4.6 Regression] ICE in finish_member_declaration() with --param ggc-min-expand=0 --param ggc-min-heapsize=0

2011-03-10 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48029

--- Comment #10 from Jason Merrill jason at gcc dot gnu.org 2011-03-10 
22:37:27 UTC ---
Author: jason
Date: Thu Mar 10 22:37:22 2011
New Revision: 170853

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=170853
Log:
PR c++/48029
* stor-layout.c (layout_type): Don't set structural equality
on arrays of incomplete type.
* tree.c (type_hash_eq): Handle comparing them properly.
* cp/pt.c (iterative_hash_template_arg): Remove special case for
ARRAY_TYPE.

Added:
trunk/gcc/testsuite/g++.dg/template/array22.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/stor-layout.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c


[Bug c++/48029] [4.5/4.6 Regression] ICE in finish_member_declaration() with --param ggc-min-expand=0 --param ggc-min-heapsize=0

2011-03-09 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48029

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.5.3
Summary|ICE in  |[4.5/4.6 Regression] ICE in
   |finish_member_declaration() |finish_member_declaration()
   |with --param|with --param
   |ggc-min-expand=0 --param|ggc-min-expand=0 --param
   |ggc-min-heapsize=0  |ggc-min-heapsize=0


[Bug c++/48029] [4.5/4.6 Regression] ICE in finish_member_declaration() with --param ggc-min-expand=0 --param ggc-min-heapsize=0

2011-03-09 Thread bergner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48029

Peter Bergner bergner at gcc dot gnu.org changed:

   What|Removed |Added

 Target|powerpc64-linux |powerpc64-linux,
   ||x86_64-linux
   Host|powerpc64-linux |powerpc64-linux,
   ||x86_64-linux
  Build|powerpc64-linux |powerpc64-linux,
   ||x86_64-linux

--- Comment #6 from Peter Bergner bergner at gcc dot gnu.org 2011-03-09 
16:24:11 UTC ---
Not power64-linux specific, since richi saw this on x86_64-linux too.


[Bug c++/48029] [4.5/4.6 Regression] ICE in finish_member_declaration() with --param ggc-min-expand=0 --param ggc-min-heapsize=0

2011-03-09 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48029

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords|GC  |
   Priority|P3  |P2

--- Comment #7 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-09 
16:46:19 UTC ---
Also ICEs when not collecting at all.


[Bug c++/48029] [4.5/4.6 Regression] ICE in finish_member_declaration() with --param ggc-min-expand=0 --param ggc-min-heapsize=0

2011-03-09 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48029

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |

--- Comment #8 from Jason Merrill jason at gcc dot gnu.org 2011-03-09 
18:32:45 UTC ---
Looking.


[Bug c++/48029] [4.5/4.6 Regression] ICE in finish_member_declaration() with --param ggc-min-expand=0 --param ggc-min-heapsize=0

2011-03-09 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48029

--- Comment #9 from Jason Merrill jason at gcc dot gnu.org 2011-03-09 
21:43:02 UTC ---
OK, the problem here is as follows:

when we first declare the myvectypes and mytype3, vectorstring has not been
instantiated, so we mark the array, and the pointer to the array, for
structural equality comparison.  When we actually go to instantiate mytype3, we
complete vectorstring and rebuild the array and pointer types, and use those
to look up the template specialization.  Which fails to find the one we already
had because the new pointer type has TYPE_CANONICAL and therefore hashes
differently from the one that didn't.

We deal with ARRAY_TYPE specially in iterative_hash_template_arg, but it seems
now that we need to apply the same special treatment to any compound type which
involves an array.

Or we could stop creating equivalent ARRAY_TYPEs, some which have
TYPE_CANONICAL, and some which don't.