[Bug c++/98329] [11 Regression] ICE in cp_build_bit_cast, at cp/semantics.c:10730

2021-01-14 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98329

Richard Biener  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED
   Priority|P3  |P1

--- Comment #3 from Richard Biener  ---
Fixed I assume.

[Bug c++/98329] [11 Regression] ICE in cp_build_bit_cast, at cp/semantics.c:10730

2021-01-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98329

--- Comment #2 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:aa4db31dd2a99b4c902f2a3ac6ef4397f84dd888

commit r11-6533-gaa4db31dd2a99b4c902f2a3ac6ef4397f84dd888
Author: Jakub Jelinek 
Date:   Thu Jan 7 23:00:28 2021 +0100

c++: Fix up tsubst of BIT_CAST_EXPR [PR98329]

As the testcase shows, calling cp_build_bit_cast in tsubst_copy doesn't
seem
to be a good idea, because tsubst_copy might not really make the operand
non-dependent, but as processing_template_decl can be 0,
type_dependent_expression_p will return false and then cp_build_bit_cast
assumes the type is non-NULL and non-dependent.
So, this patch just follows what is done e.g. for NOP_EXPR etc. and just
builds some tree in tsubst_copy, and only calls the semantics.c function
from tsubst_copy_and_build.

2021-01-07  Jakub Jelinek  

PR c++/98329
* pt.c (tsubst_copy) : Don't call
cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and
set
its location.
(tsubst_copy_and_build): Handle BIT_CAST_EXPR.

* g++.dg/cpp2a/bit-cast10.C: New test.

[Bug c++/98329] [11 Regression] ICE in cp_build_bit_cast, at cp/semantics.c:10730

2021-01-07 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98329

Jakub Jelinek  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2021-01-07

--- Comment #1 from Jakub Jelinek  ---
Created attachment 49908
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49908&action=edit
gcc11-pr98329.patch

Thanks for the report.  Untested fix attached.

[Bug c++/98329] [11 Regression] ICE in cp_build_bit_cast, at cp/semantics.c:10730

2021-01-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98329

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |11.0