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/66820] [5/6 Regression] internal compiler error: in get_expr_operands, at tree-ssa-operands.c:910
Date: Thu, 09 Jul 2015 14:34:00 -0000	[thread overview]
Message-ID: <bug-66820-4-dDrZMGIq7l@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66820-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, the problem is that the fold_stmt folding added in that revision creates
new decls that it doesn't put into the current gimplification context vars, but
instead creates whole function temporaries.

So we have in *.gimple:
      #pragma omp parallel num_threads(num_nthreads) shared(filenames)
        {
          char * D.2570;
          long unsigned int D.2571;

          {
            char filename[508];
            int i;

            try
              {
                i = 0;
                D.2570 = filenames[i];
                strcpy (&filename, D.2570);
                D.2571 = __builtin_strlen (&filename);
                D.2572 = &filename + D.2571;
                __builtin_memcpy (D.2572, "[data]", 7);
              }
            finally
              {
                filename = {CLOBBER};
              }
          }
where the D.2572 temporary has been created by fold_stmt, but it hasn't been
added into the parallel region (nor has private(D.2572) clause which would work
too).
Right now in gimplify.c maybe_fold_stmt has a hack to avoid folding anything
inside of ORT_TARGET regions, perhaps we should extend that also to
(ctx->region_type & (ORT_PARALLEL | ORT_TASK)) != 0 too (and adjust lower_omp
to fold_stmt accordingly even when taskreg_nesting_level is non-zero).
Or get rid of fold_stmt during gimplification altogether, though that is
supposedly not suitable for gcc 5 (and keep doing it only in forwprop and
later)?


  parent reply	other threads:[~2015-07-09 14:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09  9:47 [Bug libgomp/66820] New: " simon at sconseil dot fr
2015-07-09  9:48 ` [Bug libgomp/66820] " simon at sconseil dot fr
2015-07-09 10:04 ` [Bug libgomp/66820] [5/6 Regression] " mpolacek at gcc dot gnu.org
2015-07-09 10:16 ` [Bug middle-end/66820] " jakub at gcc dot gnu.org
2015-07-09 10:21 ` [Bug middle-end/66820] [5/6 Regression] " mpolacek at gcc dot gnu.org
2015-07-09 14:34 ` jakub at gcc dot gnu.org [this message]
2015-07-09 15:14 ` jakub at gcc dot gnu.org
2015-07-10 10:26 ` jakub at gcc dot gnu.org
2015-07-10 14:14 ` jakub at gcc dot gnu.org
2015-07-10 14:15 ` 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-66820-4-dDrZMGIq7l@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).