https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90887
--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #8)
> Still debugging.
>
> I add tons of 'printf' and the first difference which shows up is the
> following call:
[That's without call to register_symbol, i.e. doesn't influence the debug
output.]
cp_parser_jump_statement (for RID_RETURN) calls check_return_expr - and here it
differs:
* Without debug, type_dependent_expression_p (retval) is true and, hence,
build_non_dependent_expr (with flag == 2) -> fold_non_dependent_expr ->
fold_non_dependent_expr_template is called.
* With -g3, type_dependent_expression_p (retval) is false and 'retval' is
returned. Now looking at that 'retval'.
In gcc-trunk/include/c++/10.0.0/bits/stl_tree.h:2093:18, one has:
if (__j == begin())
return _Res(__x, __y);
The dump for -g3 has:
<cast_expr 0x7fffeb648c20
type <record_type 0x7fffeb00d738 _Res type_0 type_5 type_6 VOID
align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
context <namespace_decl 0x7ffff1f44098 std>
full-name "_Res"
no-binfo use_template=1 interface-unknown
...
while -gtoggle has:
<cast_expr 0x7fffebab5180
type <record_type 0x7fffebaaaa80 _Res needs-constructing type_1 type_5
type_6 TI
size <integer_cst 0x7ffff1f2ae70 constant 128>
unit-size <integer_cst 0x7ffff1f2ae88 constant 16>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffebd9e0a8
fields <field_decl 0x7fffebaa8098 D.156510 type <record_type
0x7fffeba5b5e8 __pair_base>
ignored decl_6 QI
/data/local_users/tobiasb/gcc/gcc-trunk/include/c++/10.0.0/bits/stl_pair.h:207:12
size <integer_cst 0x7ffff1f2ae58 constant 0> unit-size <integer_cst
0x7ffff1f2ae58 0>
align:8 warn_if_not_align:0 offset_align 8 offset <integer_cst
0x7ffff1f2ae58 0>
bit-offset <integer_cst 0x7ffff1f2aea0 constant 0> context
<record_type 0x7fffebd9e0a8 pair> chain <field_decl 0x7fffeba50ed8 first>>
context <namespace_decl 0x7ffff1f44098 std>
full-name "_Res"
needs-constructor X() X(constX&) this=(X&) n_parents=1 use_template=1
interface-unknown