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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-12-06
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
   Target Milestone|---                         |7.0
     Ever confirmed|0                           |1

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r241765, though this is in C++11, not C++17, and it ICEs with
-fno-new-inheriting-ctors as well as -fnew-inheriting-ctors.
Reverting just the tree-inline.c hunks fixed this.  Thinking about it, it is
unsafe not to copy the untaken branch, exactly because it can be entered
through goto from other parts of the code.  So, either we need some flag on the
COND_EXPR from the FE that would guarantee that the non-taken if branch is not
entered through labels, or e.g. search it for user labels and if there are any,
don't do this?  Do you have a testcase for which the tree-inline.c change was
needed?  I've tried to make check-c++-all RUNTESTFLAGS=dg.exp=*inh*ct* with the
tree-inline.c change reverted and saw no failures.
It would be good to know if in the if (is_base_ctor) guarded code you can
actually have user labels or not.  If not, I can handle this easily in
tree-inline.c.  If yes, then we need to fix it differently.

Reply via email to