[Bug c++/71576] [4.9/5/6/7 Regression] ICE on valid C++11 code (with xvalue and bitfield) on x86_64-linux-gnu: in build_target_expr, at cp/tree.c:385

2016-07-25 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71576

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Mon Jul 25 21:14:20 2016
New Revision: 238736

URL: https://gcc.gnu.org/viewcvs?rev=238736=gcc=rev
Log:
PR c++/71576 - bitfield and rvalue reference

* call.c (convert_like_real): Use lvalue_kind.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp0x/rv-bitfield3.C
Modified:
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/call.c

[Bug c++/71576] [4.9/5/6/7 Regression] ICE on valid C++11 code (with xvalue and bitfield) on x86_64-linux-gnu: in build_target_expr, at cp/tree.c:385

2016-07-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71576

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Sun Jul 24 02:25:36 2016
New Revision: 238683

URL: https://gcc.gnu.org/viewcvs?rev=238683=gcc=rev
Log:
PR c++/71576 - bitfield and rvalue reference

* call.c (convert_like_real): Use lvalue_kind.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/rv-bitfield3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c

[Bug c++/71576] [4.9/5/6/7 Regression] ICE on valid C++11 code (with xvalue and bitfield) on x86_64-linux-gnu: in build_target_expr, at cp/tree.c:385

2016-07-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71576

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/71576] [4.9/5/6/7 Regression] ICE on valid C++11 code (with xvalue and bitfield) on x86_64-linux-gnu: in build_target_expr, at cp/tree.c:385

2016-07-08 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71576

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Priority|P3  |P2

[Bug c++/71576] [4.9/5/6/7 Regression] ICE on valid C++11 code (with xvalue and bitfield) on x86_64-linux-gnu: in build_target_expr, at cp/tree.c:385

2016-06-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71576

--- Comment #2 from Jakub Jelinek  ---
s/properly/.
Anyway, the thing is that we use
cp_lvalue_kind lvalue = real_lvalue_p (expr);
and test the various clk_* bits from it, but this returns clk_none if
lvalue_kind has clk_class or clk_rvalueref set in it.
In this case, lvalue_kind (expr) is clk_bitfield | clk_class, and if we don't
want to ICE, for the creation of the temporary we need the bitfield type to be
widened to the underlying type.
So perhaps:
if (lvalue & clk_bitfield)
  {
expr = convert_bitfield_to_declared_type (expr);
expr = fold_convert (type, expr);
  }
should be if (lvalue_kind (expr) & clk_bitfield) instead, or just
unconditional?
What about the other lvalue & clk_* tests a few lines before?  Do they mean to
ignore clk_bitfield or clk_packed if clk_class (or clk_rvalueref) is also set?
If not, perhaps real_lvalue_p call should be replaced with lvalue_kind.

[Bug c++/71576] [4.9/5/6/7 Regression] ICE on valid C++11 code (with xvalue and bitfield) on x86_64-linux-gnu: in build_target_expr, at cp/tree.c:385

2016-06-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71576

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|--- |4.9.4

[Bug c++/71576] [4.9/5/6/7 Regression] ICE on valid C++11 code (with xvalue and bitfield) on x86_64-linux-gnu: in build_target_expr, at cp/tree.c:385

2016-06-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71576

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-06-20
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
Summary|ICE on valid C++11 code |[4.9/5/6/7 Regression] ICE
   |(with xvalue and bitfield)  |on valid C++11 code (with
   |on x86_64-linux-gnu: in |xvalue and bitfield) on
   |build_target_expr, at   |x86_64-linux-gnu: in
   |cp/tree.c:385   |build_target_expr, at
   ||cp/tree.c:385
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started most likely with r180944 (r180941 properly rejects it, r180959 already
ICEs).