public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/103643] New: [12 Regression][OpenMP] ICE in create_tmp_var, at gimple-expr.c:482 - via gimplify_omp_affinity
@ 2021-12-10  9:59 burnus at gcc dot gnu.org
  2021-12-10 10:04 ` [Bug middle-end/103643] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-12-10  9:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103643
           Summary: [12 Regression][OpenMP] ICE in create_tmp_var, at
                    gimple-expr.c:482 - via gimplify_omp_affinity
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openmp
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Did compile in November but now ICEs.

Long testcase:
https://github.com/SOLLVE/sollve_vv/blob/master/tests/5.0/task/test_task_affinity_device.F90


./tests/5.0/task/test_task_affinity_device.F90:47:51:

   47 |     !$omp task depend(out: B) shared(B) affinity(A)
      |                                                   ^
internal compiler error: in create_tmp_var, at gimple-expr.c:482
0x6dd612 create_tmp_var(tree_node*, char const*)
        ../../repos/gcc/gcc/gimple-expr.c:482
0xcfada0 create_tmp_from_val
        ../../repos/gcc/gcc/gimplify.c:570
0xcfada0 lookup_tmp_var
        ../../repos/gcc/gcc/gimplify.c:588
0xcfada0 internal_get_tmp_var
        ../../repos/gcc/gcc/gimplify.c:641
0xcf4597 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../repos/gcc/gcc/gimplify.c:15954
0xd0a714 gimplify_omp_affinity
        ../../repos/gcc/gcc/gimplify.c:8125
0xd0a714 gimplify_scan_omp_clauses
        ../../repos/gcc/gcc/gimplify.c:10184


Reduced testcase:

PROGRAM test_task_affinity
  INTEGER,ALLOCATABLE:: A(:), B(:)
  !$omp target map(from: B)
    !$omp task depend(out: B) shared(B) affinity(A)
    !$omp end task
  !$omp end target
END PROGRAM test_task_affinity

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/103643] [12 Regression][OpenMP] ICE in create_tmp_var, at gimple-expr.c:482 - via gimplify_omp_affinity
  2021-12-10  9:59 [Bug middle-end/103643] New: [12 Regression][OpenMP] ICE in create_tmp_var, at gimple-expr.c:482 - via gimplify_omp_affinity burnus at gcc dot gnu.org
@ 2021-12-10 10:04 ` jakub at gcc dot gnu.org
  2022-01-04  7:37 ` cvs-commit at gcc dot gnu.org
  2022-01-04  9:19 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-12-10 10:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-12-10

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r12-5706-g1ac7a8c9e4798d352eb8c64905dd38086af4e1cd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/103643] [12 Regression][OpenMP] ICE in create_tmp_var, at gimple-expr.c:482 - via gimplify_omp_affinity
  2021-12-10  9:59 [Bug middle-end/103643] New: [12 Regression][OpenMP] ICE in create_tmp_var, at gimple-expr.c:482 - via gimplify_omp_affinity burnus at gcc dot gnu.org
  2021-12-10 10:04 ` [Bug middle-end/103643] " jakub at gcc dot gnu.org
@ 2022-01-04  7:37 ` cvs-commit at gcc dot gnu.org
  2022-01-04  9:19 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-04  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Chung-Lin Tang <cltang@gcc.gnu.org>:

https://gcc.gnu.org/g:62c8b21d48ab6012ddc50529a39071d902dba31a

commit r12-6200-g62c8b21d48ab6012ddc50529a39071d902dba31a
Author: Chung-Lin Tang <cltang@codesourcery.com>
Date:   Tue Jan 4 15:37:15 2022 +0800

    openmp: Fix ICE in gimplify_omp_affinity [PR103643]

    After the PR90030 patch, which removes the universal casting of all Fortran
    array pointers to 'c_char*', a Fortran descriptor based array passed into
an
    affinity() clause now looks like:

    -     #pragma omp task private(i) shared(b) affinity(*(c_char *) a.data)
    +     #pragma omp task private(i) shared(b) affinity(*(integer(kind=4)[0:]
* restrict) a.data)

    The 'integer(kind=4)[0:]' incomplete type appears to be causing ICE during
    gimplify_expr() due to 'is_gimple_val, fb_rvalue'. The ICE appears to be
fixed
    just by adjusting to 'is_gimple_lvalue, fb_lvalue'. Considering the use of
the
    affinity() clause, which should be specifying the location of a particular
    object in memory, this probably makes sense.

    gcc/ChangeLog:

            PR middle-end/103643

            * gimplify.c (gimplify_omp_affinity): Adjust gimplify_expr of
entire
            OMP_CLAUSE_DECL to use 'is_gimple_lvalue, fb_lvalue'

    gcc/testsuite/ChangeLog:

            * gfortran.dg/gomp/pr103643.f90: New test.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/103643] [12 Regression][OpenMP] ICE in create_tmp_var, at gimple-expr.c:482 - via gimplify_omp_affinity
  2021-12-10  9:59 [Bug middle-end/103643] New: [12 Regression][OpenMP] ICE in create_tmp_var, at gimple-expr.c:482 - via gimplify_omp_affinity burnus at gcc dot gnu.org
  2021-12-10 10:04 ` [Bug middle-end/103643] " jakub at gcc dot gnu.org
  2022-01-04  7:37 ` cvs-commit at gcc dot gnu.org
@ 2022-01-04  9:19 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-04  9:19 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-04  9:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10  9:59 [Bug middle-end/103643] New: [12 Regression][OpenMP] ICE in create_tmp_var, at gimple-expr.c:482 - via gimplify_omp_affinity burnus at gcc dot gnu.org
2021-12-10 10:04 ` [Bug middle-end/103643] " jakub at gcc dot gnu.org
2022-01-04  7:37 ` cvs-commit at gcc dot gnu.org
2022-01-04  9:19 ` rguenth at gcc dot gnu.org

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).