[Bug c++/89705] [7/8/9 Regression] ICE in convert_like_real, at cp/call.c:7334

2019-03-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89705

--- Comment #6 from Marek Polacek  ---
Author: mpolacek
Date: Mon Mar 25 16:10:06 2019
New Revision: 269918

URL: https://gcc.gnu.org/viewcvs?rev=269918=gcc=rev
Log:
PR c++/89705 - ICE with reference binding with conversion function.
* call.c (reference_binding): If the result of the conversion function
is a prvalue of non-class type, use the cv-unqualified type.

* g++.dg/cpp0x/rv-conv2.C: New test.

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

[Bug c++/89705] [7/8/9 Regression] ICE in convert_like_real, at cp/call.c:7334

2019-03-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89705

--- Comment #5 from Marek Polacek  ---
Another testcase with an lvalue reference:

struct W { operator const volatile int(); };
const int& i = W();

But I think all those testcases are invalid, because [dcl.init.ref] says: If T1
is reference-related to T2, cv1 shall be the same cv-qualification as, or
greater cv-qualification than, cv2.

[Bug c++/89705] [7/8/9 Regression] ICE in convert_like_real, at cp/call.c:7334

2019-03-14 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89705

Marek Polacek  changed:

   What|Removed |Added

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

[Bug c++/89705] [7/8/9 Regression] ICE in convert_like_real, at cp/call.c:7334

2019-03-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89705

Richard Biener  changed:

   What|Removed |Added

   Keywords||rejects-valid
   Priority|P3  |P2

[Bug c++/89705] [7/8/9 Regression] ICE in convert_like_real, at cp/call.c:7334

2019-03-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89705

--- Comment #4 from Marek Polacek  ---
Same with int:

struct W { operator const int(); };
int&& i = W();

[Bug c++/89705] [7/8/9 Regression] ICE in convert_like_real, at cp/call.c:7334

2019-03-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89705

--- Comment #3 from Jakub Jelinek  ---
Started to be rejected in r209521 with:
error: invalid initialization of reference of type ā€˜E&&ā€™ from expression of
type ā€˜Sā€™
(before accepted).
Started to ICE with r210436.

[Bug c++/89705] [7/8/9 Regression] ICE in convert_like_real, at cp/call.c:7334

2019-03-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89705

--- Comment #2 from Marek Polacek  ---
Started with r210436.

[Bug c++/89705] [7/8/9 Regression] ICE in convert_like_real, at cp/call.c:7334

2019-03-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89705

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-03-13
 CC||mpolacek at gcc dot gnu.org
  Known to work||4.9.4
   Target Milestone|--- |7.5
Summary|ICE in convert_like_real,   |[7/8/9 Regression] ICE in
   |at cp/call.c:7334   |convert_like_real, at
   ||cp/call.c:7334
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.