[Bug c++/65525] [5 Regression] ICE: sorry, unimplemented: unexpected AST of kind mem_ref (-std=c++14, ICE: in potential_constant_expression_1, at cp/constexpr.c:4432)

2015-03-27 Thread rogero at howzatt dot demon.co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65525

--- Comment #7 from Roger Orr rogero at howzatt dot demon.co.uk ---
Thanks!


[Bug c++/65525] [5 Regression] ICE: sorry, unimplemented: unexpected AST of kind mem_ref (-std=c++14, ICE: in potential_constant_expression_1, at cp/constexpr.c:4432)

2015-03-26 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65525

--- Comment #6 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Thu Mar 26 17:58:39 2015
New Revision: 221699

URL: https://gcc.gnu.org/viewcvs?rev=221699root=gccview=rev
Log:
PR c++/65525
* constexpr.c (potential_constant_expression_1): Handle MEM_REF.

Added:
trunk/gcc/testsuite/g++.dg/parse/assign1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c


[Bug c++/65525] [5 Regression] ICE: sorry, unimplemented: unexpected AST of kind mem_ref (-std=c++14, ICE: in potential_constant_expression_1, at cp/constexpr.c:4432)

2015-03-26 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65525

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.0

--- Comment #5 from Jason Merrill jason at gcc dot gnu.org ---
Fixed.


[Bug c++/65525] [5 Regression] ICE: sorry, unimplemented: unexpected AST of kind mem_ref (-std=c++14, ICE: in potential_constant_expression_1, at cp/constexpr.c:4432)

2015-03-26 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65525

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org ---
(In reply to Richard Biener from comment #3)
 so I wonder why we look at the side-effects at all?  That is, why does
 COMPOUND_EXPR handling not return false on side-effects early?

Because a call to a constexpr function has TREE_SIDE_EFFECTS; we don't know
whether it's constant until we do the evaluation.