[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

2011-03-11 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47808

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #11 from Jakub Jelinek jakub at gcc dot gnu.org 2011-03-11 
10:29:49 UTC ---
I think it isn't the ?: arms here, but the condition on which convert_like_real
is called.  fold_nondependent_expr on the COND_EXPR called from
compute_array_index_type results in tsubst_copy_and_build on the CALL_EXPR to
abs overload, which then eventually calls convert_like_real.


[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

2011-03-11 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47808

--- Comment #12 from Jakub Jelinek jakub at gcc dot gnu.org 2011-03-11 
10:35:17 UTC ---
build_aggr_init_expr isn't called at all here BTW, I just don't see too many
similarities with PR46003.


[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

2011-03-11 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47808

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1


[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

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

--- Comment #13 from Jason Merrill jason at gcc dot gnu.org 2011-03-11 
15:45:58 UTC ---
(In reply to comment #11)
 I think it isn't the ?: arms here, but the condition on which 
 convert_like_real
 is called.

Same principle applies.

 fold_nondependent_expr on the COND_EXPR called from
 compute_array_index_type results in tsubst_copy_and_build on the CALL_EXPR to
 abs overload, which then eventually calls convert_like_real.

The problem comes when we try to tsubst_copy_and_build the result of the
convert_like_real called at template definition time.

 build_aggr_init_expr isn't called at all here BTW, I just don't see too many
similarities with PR46003.

My point in discussing 46003 has been that the problem is
build_conditional_expr calling convert_like_real; build_aggr_init_expr isn't
the key.


[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

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

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #14 from Jason Merrill jason at gcc dot gnu.org 2011-03-11 
15:59:18 UTC ---
OK, I see what Jakub means now.  build_conditional_expr isn't actually the
problem in this testcase.


[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

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

--- Comment #15 from Jason Merrill jason at gcc dot gnu.org 2011-03-11 
16:49:46 UTC ---
Author: jason
Date: Fri Mar 11 16:49:41 2011
New Revision: 170878

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=170878
Log:
PR c++/47808
* decl.c (compute_array_index_type): Discard folding
if it didn't produce a constant.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/regress/array1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

2011-03-11 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47808

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Depends on|46003   |
 Resolution||FIXED

--- Comment #16 from Jakub Jelinek jakub at gcc dot gnu.org 2011-03-11 
17:05:35 UTC ---
Fixed, thanks.


[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

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

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

  Known to work||4.5.2
   Target Milestone|--- |4.6.0
Summary|[C++0x] internal compiler   |[4.6 Regression][C++0x]
   |error: in   |internal compiler error: in
   |tsubst_copy_and_build, at   |tsubst_copy_and_build, at
   |cp/pt.c:13326   |cp/pt.c:13326


[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

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

--- Comment #8 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-09 
14:14:08 UTC ---
that was reduced using the most recent snapshot not HEAD of trunk, so apologies
if it doesn't fail with an up-to-date build


[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

2011-03-09 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47808

--- Comment #9 from Paolo Carlini paolo.carlini at oracle dot com 2011-03-09 
14:40:48 UTC ---
I can confirm the ICE with r170818.


[Bug c++/47808] [4.6 Regression][C++0x] internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13326

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

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org
 Depends on||46003

--- Comment #10 from Jason Merrill jason at gcc dot gnu.org 2011-03-09 
18:11:52 UTC ---
This is the same bug as 46003, just not ARM-specific: we shouldn't actually be
calling convert_like_real for arms of ?: in a template.