public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/108685] [10/11/12/13 Regression] ICE in verify_loop_structure, at cfgloop.cc:1748 since r13-2388-ga651e6d59188da
Date: Wed, 15 Feb 2023 15:15:26 +0000	[thread overview]
Message-ID: <bug-108685-4-DpzBbyXOcx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108685-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
expand_omp_for_generic like other ompexp functions has the notion of
broken_loop for
loops where the body doesn't fall through to the artificial #pragma omp
continue.
This works fine even for doacross loops if they have ordered equals collapse or
all the loops between ordered (inclusive) and collapse (exclusive) have compile
time constant non-zero number of iterations.
The problem is when they could have zero iterations (as in the testcase) or do
have those provably - say if l < a above is replaced with l < -2, in that case
while the ultimate body is a broken loop, either conditionally or always that
ultimate body will not be encountered at runtime at all, and the loop will do
nothing at all.  In that case
the loop is no longer a non-loop (broken_loop) because in some cases or all it
can actually loop.
We can I think detect that after the expand_omp_for_init_counts call in
expand_omp_for_generic.  The question is if we at that point can add an
artificial cont_bb somewhere, set broken_loop to false and do whatever is
needed to make the rest of the function work as if it wasn't a broken loop.

  parent reply	other threads:[~2023-02-15 15:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06 18:50 [Bug c/108685] New: [13 Regression] ICE in verify_loop_structure, at cfgloop.cc:1748 gscfq@t-online.de
2023-02-06 20:20 ` [Bug middle-end/108685] " pinskia at gcc dot gnu.org
2023-02-07 14:06 ` rguenth at gcc dot gnu.org
2023-02-10  9:05 ` [Bug middle-end/108685] [13 Regression] ICE in verify_loop_structure, at cfgloop.cc:1748 since r13-2388-ga651e6d59188da marxin at gcc dot gnu.org
2023-02-15 13:41 ` [Bug middle-end/108685] [10/11/12/13 " jakub at gcc dot gnu.org
2023-02-15 15:15 ` jakub at gcc dot gnu.org [this message]
2023-02-15 16:14 ` jakub at gcc dot gnu.org
2023-02-21 12:50 ` rguenth at gcc dot gnu.org
2023-03-16 17:32 ` jakub at gcc dot gnu.org
2023-03-17  8:00 ` cvs-commit at gcc dot gnu.org
2023-03-17  8:29 ` [Bug middle-end/108685] [10/11/12 " jakub at gcc dot gnu.org
2023-03-19  5:31 ` cvs-commit at gcc dot gnu.org
2023-03-20 10:30 ` [Bug middle-end/108685] [10/11 " jakub at gcc dot gnu.org
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03 10:37 ` [Bug middle-end/108685] [10 " jakub at gcc dot gnu.org
2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org
2023-05-04  7:24 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108685-4-DpzBbyXOcx@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).