This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/70704] [6 Regression] AIX bootstrap comparison failure


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70704

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #47 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, I believe it is the:
  /* When checking, try to get a constant value for all non-dependent
     expressions in order to expose bugs in *_dependent_expression_p
     and constexpr.  */
  if (flag_checking && cxx_dialect >= cxx11
      /* Don't do this during nsdmi parsing as it can lead to
         unexpected recursive instantiations.  */
      && !parsing_nsdmi ())
    fold_non_dependent_expr (expr);
hunk in cp/pt.c (build_nondependent_expr), which results both in some extra
DECL_UIDs being created (in theory it could be fine), but also in funcdef_no
differences etc.:
#0  _Z24allocate_struct_functionP9tree_nodeb (fndecl=0x7061b280,
abstract_p=false) at /home/dje/src/gcc-6.0.1-RC2/gcc/function.c:4874
#1  0x10070e60 in _Z24start_preparsed_functionP9tree_nodeS0_i
(decl1=0x7061b280, attrs=0x0, flags=1)
    at /home/dje/src/gcc-6.0.1-RC2/gcc/cp/decl.c:14059
#2  0x105feb9c in _Z16instantiate_declP9tree_nodeib (d=0x7061b280, defer_ok=0,
expl_inst_class_mem_p=false)
    at /home/dje/src/gcc-6.0.1-RC2/gcc/cp/pt.c:21969
#3  0x1094fd38 in _Z9mark_usedP9tree_nodei (decl=0x7061b280, complain=0) at
/home/dje/src/gcc-6.0.1-RC2/gcc/cp/decl2.c:5273
#4  0x1023262c in _ZL15build_over_callP11z_candidateii (cand=0x306323c0,
flags=262145, complain=0)
    at /home/dje/src/gcc-6.0.1-RC2/gcc/cp/call.c:7707
#5  0x10221f8c in
_Z23build_new_function_callP9tree_nodePP3vecIS0_5va_gc8vl_embedEbi
(fn=0x7045e468, args=0x2ff200f0, koenig_p=false, complain=0)
    at /home/dje/src/gcc-6.0.1-RC2/gcc/cp/call.c:4152
#6  0x100dba64 in _Z16finish_call_exprP9tree_nodePP3vecIS0_5va_gc8vl_embedEbbi
(fn=0x7045e468, args=0x2ff200f0, disallow_virtual=false, 
    koenig_p=false, complain=0) at
/home/dje/src/gcc-6.0.1-RC2/gcc/cp/semantics.c:2461
#7  0x105e30ac in _Z21tsubst_copy_and_buildP9tree_nodeS0_iS0_bb (t=0x7061e180,
args=0x0, complain=0, in_decl=0x0, function_p=false, 
    integral_constant_expression_p=true) at
/home/dje/src/gcc-6.0.1-RC2/gcc/cp/pt.c:16629
#8  0x105a4bf8 in _Z39instantiate_non_dependent_expr_internalP9tree_nodei
(expr=0x7061e180, complain=0)
    at /home/dje/src/gcc-6.0.1-RC2/gcc/cp/pt.c:5640
#9  0x114c1278 in _Z23fold_non_dependent_exprP9tree_node (t=0x7061e180) at
/home/dje/src/gcc-6.0.1-RC2/gcc/cp/constexpr.c:4388
#10 0x10606e08 in _Z24build_non_dependent_exprP9tree_node (expr=0x7061e180) at
/home/dje/src/gcc-6.0.1-RC2/gcc/cp/pt.c:23631

As stage1 is built with the default --enable-stage1-checking, the result
between stage1 and stage2 auto-host.h is:
CHECKING_P, ENABLE_GC_CHECKING, ENABLE_GIMPLE_CHECKING,
ENABLE_RTL_FLAG_CHECKING, ENABLE_TREE_CHECKING, ENABLE_TYPES_CHECKING, and
allocate_struct_function allocates a new cfun->funcdef_no, which is then
emitted in the LFB..*/LFE..* labels, seems to affect the debug info (which on
AIX is emitted in both stage2 and stage3) etc.

Additionally, wonder if retrieve_specialization's
  if (flag_checking)
    verify_unstripped_args (args);
couldn't also affect bootstrap, but haven't seen that during bootstrap.

The question is what to do, comment out the fold_non_dependent_expr stuff
altogether on the release branch (at least temporarily), guard with some other
option (which unlike -fchecking would be documented to possibly affect code
generation and which would be based on some other configure checking flag (and
the default for that flag would be always the same between stage1 and later
stages), something different?
I'm in any case starting a bootstrap now with the fold_non_dependent_expr call
commented out.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]