[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2021-12-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

Andrew Pinski  changed:

   What|Removed |Added

 CC||uruwi at protonmail dot com

--- Comment #12 from Andrew Pinski  ---
*** Bug 83716 has been marked as a duplicate of this bug. ***

[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2017-12-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org

--- Comment #11 from Eric Gallager  ---
(In reply to Jason Merrill from comment #9)
> Author: jason
> Date: Mon Nov 13 21:49:16 2017
> New Revision: 254710
> 
> URL: https://gcc.gnu.org/viewcvs?rev=254710=gcc=rev
> Log:
>   PR c++/82360 - ICE with static_cast in template.
> 
>   * call.c (perform_direct_initialization_if_possible): Check
>   processing_template_decl.
>   * typeck.c (build_static_cast_1): Likewise.
> 
> Added:
> trunk/gcc/testsuite/g++.dg/template/cast5.C
> Modified:
> trunk/gcc/cp/ChangeLog
> trunk/gcc/cp/call.c
> trunk/gcc/cp/typeck.c

Aw, my latest gcc was built just 2 days before this... guess I'll have to
rebuild...

[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2017-11-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Jason Merrill  ---
Fixed.

[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2017-11-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

--- Comment #9 from Jason Merrill  ---
Author: jason
Date: Mon Nov 13 21:49:16 2017
New Revision: 254710

URL: https://gcc.gnu.org/viewcvs?rev=254710=gcc=rev
Log:
PR c++/82360 - ICE with static_cast in template.

* call.c (perform_direct_initialization_if_possible): Check
processing_template_decl.
* typeck.c (build_static_cast_1): Likewise.

Added:
trunk/gcc/testsuite/g++.dg/template/cast5.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/typeck.c

[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2017-11-03 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #8 from Martin Liška  ---
*** Bug 82822 has been marked as a duplicate of this bug. ***

[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2017-10-31 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||sgunderson at bigfoot dot com

--- Comment #7 from Markus Trippelsdorf  ---
*** Bug 82780 has been marked as a duplicate of this bug. ***

[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2017-10-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||hunter at openrobotics dot org

--- Comment #6 from Markus Trippelsdorf  ---
*** Bug 82766 has been marked as a duplicate of this bug. ***

[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2017-10-09 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

Tobias Burnus  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org,
   ||jason at gcc dot gnu.org

--- Comment #5 from Tobias Burnus  ---
[Still occurs with today's Rev. 253536.]

Bisecting (for comment 2) points to:

https://gcc.gnu.org/viewcvs?rev=253266=gcc=rev
commit 4cedc476c94a41551d965bc57fbbe0186983c3c4

Author: jason
Date:   Thu Sep 28 19:39:45 2017 +

PR c++/56973, DR 696 - capture constant variables only as needed.

* expr.c (mark_use): Split out from mark_rvalue_use and
mark_lvalue_use.  Handle lambda capture of constant variables.
(mark_lvalue_use_nonread): New.
* semantics.c (process_outer_var_ref): Don't capture a constant
variable until forced.
* pt.c (processing_nonlambda_template): New.
* call.c (build_this): Check it.
* decl2.c (grok_array_decl): Call mark_rvalue_use and
mark_lvalue_use_nonread.
* init.c (constant_value_1): Don't call mark_rvalue_use.
* typeck.c (build_static_cast): Handle lambda capture.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253266
138bc75d-0d04-0410-961f-82ee72b054a4

[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2017-10-05 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

--- Comment #4 from David Binderman  ---
Possibly in the same area, I just tried a valgrind build of trunk gcc and
got this:

==4967== Invalid read of size 8
==4967==at 0xD87FD8: component_ref_field_offset(tree_node*) (tree.c:12600)
==4967==by 0x9786EB: get_inner_reference(tree_node*, long*, long*,
tree_node**, machine_mode*, int*, int*, int*) (expr.c:7059)
==4967==by 0x9A9C6E: fold_unary_loc(unsigned int, tree_code, tree_node*,
tree_node*) (fold-const.c:7724)
==4967==by 0x9AA0D9: fold_build1_loc(unsigned int, tree_code, tree_node*,
tree_node*) (fold-const.c:12226)

[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2017-10-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-10-02
  Known to work||7.2.1
   Target Milestone|--- |8.0
Summary|tree check fail in  |[8 Regression]  tree check
   |get_inner_reference, at |fail in
   |expr.c:6996 |get_inner_reference, at
   ||expr.c:6996
 Ever confirmed|0   |1

--- Comment #3 from Richard Biener  ---
Confirmed.

> ./cc1plus  -quiet t.ii
t.ii: In constructor ‘b<  >::b(b<
 >&&)’:
t.ii:3:37: internal compiler error: tree check: expected tree that contains
‘decl common’ structure, have ‘identifier_node’ in get_inner_reference, at
expr.c:6996
   b(b &) : d(static_cast(c.d)) {}
 ^
0x155dde4 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
/tmp/trunk2/gcc/tree.c:9254
0x7ff44f contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/tmp/trunk2/gcc/tree.h:3218
0xd8ff31 get_inner_reference(tree_node*, long*, long*, tree_node**,
machine_mode*, int*, int*, int*)
/tmp/trunk2/gcc/expr.c:6996
0xdd1d04 fold_unary_loc(unsigned int, tree_code, tree_node*, tree_node*)
/tmp/trunk2/gcc/fold-const.c:7726
0xde70dd fold_build1_loc(unsigned int, tree_code, tree_node*, tree_node*)
/tmp/trunk2/gcc/fold-const.c:12226
0xdbce9f fold_convert_loc(unsigned int, tree_node*, tree_node*)
/tmp/trunk2/gcc/fold-const.c:2257
0x8a3306 cp_fold_convert(tree_node*, tree_node*)
/tmp/trunk2/gcc/cp/cvt.c:607
0xb0019a build_static_cast_1
/tmp/trunk2/gcc/cp/typeck.c:6852
0xb012f9 build_static_cast(tree_node*, tree_node*, int)
/tmp/trunk2/gcc/cp/typeck.c:7079
0x9aec22 cp_parser_postfix_expression
/tmp/trunk2/gcc/cp/parser.c:6584
0x9b31a3 cp_parser_unary_expression
/tmp/trunk2/gcc/cp/parser.c:8251
0x9b428a cp_parser_cast_expression
/tmp/trunk2/gcc/cp/parser.c:9019