public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100633] New: ICE: gfc_trans_omp_workshare(): Bad statement code
@ 2021-05-17  6:25 asolokha at gmx dot com
  2021-05-17  8:10 ` [Bug fortran/100633] " marxin at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2021-05-17  6:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100633
           Summary: ICE: gfc_trans_omp_workshare(): Bad statement code
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, openmp
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gfortran-12.0.0-alpha20210516 snapshot
(g:4a322345cab10879162a2ddf659fb0f873ba0182) ICEs when compiling the following
testcase, extracted from test/Semantics/omp-workshare03.f90 from the flang
12.0.0 test suite, w/ -fopenmp:

module defined_assign
  interface assignment(=)
    module procedure work_assign
  end interface

  contains
    subroutine work_assign(a,b)
      integer, intent(out) :: a
      logical, intent(in) :: b(:)
    end subroutine work_assign
end module defined_assign

program omp_workshare
  use defined_assign

  integer :: a
  logical :: l(10)
  l = .TRUE.

  !$omp workshare
  a = l
  !$omp end workshare

end program omp_workshare

% gfortran-12.0.0 -fopenmp -c dd24tjoy.f90
f951: internal compiler error: gfc_trans_omp_workshare(): Bad statement code
0x82f5c9 gfc_report_diagnostic
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/fortran/error.c:782
0x82f5c9 gfc_internal_error(char const*, ...)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/fortran/error.c:1402
0x9757ea gfc_trans_omp_workshare
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/fortran/trans-openmp.c:6128
0x8f1645 trans_code
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/fortran/trans.c:2209
0x921313 gfc_generate_function_code(gfc_namespace*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/fortran/trans-decl.c:6885
0x89a917 translate_all_program_units
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/fortran/parse.c:6370
0x89a917 gfc_parse_file()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/fortran/parse.c:6639
0x8ee74f gfc_be_parse_file
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/fortran/f95-lang.c:212

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

* [Bug fortran/100633] ICE: gfc_trans_omp_workshare(): Bad statement code
  2021-05-17  6:25 [Bug fortran/100633] New: ICE: gfc_trans_omp_workshare(): Bad statement code asolokha at gmx dot com
@ 2021-05-17  8:10 ` marxin at gcc dot gnu.org
  2021-05-17 11:23 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-05-17  8:10 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-05-17
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, it's old, I can see it also with GCC 4.9.0.

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

* [Bug fortran/100633] ICE: gfc_trans_omp_workshare(): Bad statement code
  2021-05-17  6:25 [Bug fortran/100633] New: ICE: gfc_trans_omp_workshare(): Bad statement code asolokha at gmx dot com
  2021-05-17  8:10 ` [Bug fortran/100633] " marxin at gcc dot gnu.org
@ 2021-05-17 11:23 ` cvs-commit at gcc dot gnu.org
  2021-05-18  6:54 ` cvs-commit at gcc dot gnu.org
  2021-05-18  7:31 ` burnus at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-17 11:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:

https://gcc.gnu.org/g:582776eb1b62c32f5234566a01ea92247b7d6bcc

commit r12-827-g582776eb1b62c32f5234566a01ea92247b7d6bcc
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Mon May 17 13:20:27 2021 +0200

    OpenMP/Fortran: Reject nonintrinsic assignments in OMP WORKSHARE [PR100633]

            PR fortran/100633

    gcc/fortran/ChangeLog:

            * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
            OMP WORKSHARE.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/gomp/workshare-59.f90: New test.

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

* [Bug fortran/100633] ICE: gfc_trans_omp_workshare(): Bad statement code
  2021-05-17  6:25 [Bug fortran/100633] New: ICE: gfc_trans_omp_workshare(): Bad statement code asolokha at gmx dot com
  2021-05-17  8:10 ` [Bug fortran/100633] " marxin at gcc dot gnu.org
  2021-05-17 11:23 ` cvs-commit at gcc dot gnu.org
@ 2021-05-18  6:54 ` cvs-commit at gcc dot gnu.org
  2021-05-18  7:31 ` burnus at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-18  6:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Tobias Burnus
<burnus@gcc.gnu.org>:

https://gcc.gnu.org/g:efb6bda7f5136d59be254b10d2b81ba28be8ecfb

commit r11-8428-gefb6bda7f5136d59be254b10d2b81ba28be8ecfb
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Mon May 17 13:20:27 2021 +0200

    OpenMP/Fortran: Reject nonintrinsic assignments in OMP WORKSHARE [PR100633]

            PR fortran/100633

    gcc/fortran/ChangeLog:

            * resolve.c (gfc_resolve_code): Reject nonintrinsic assignments in
            OMP WORKSHARE.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/gomp/workshare-59.f90: New test.

    (cherry picked from commit 582776eb1b62c32f5234566a01ea92247b7d6bcc)

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

* [Bug fortran/100633] ICE: gfc_trans_omp_workshare(): Bad statement code
  2021-05-17  6:25 [Bug fortran/100633] New: ICE: gfc_trans_omp_workshare(): Bad statement code asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-05-18  6:54 ` cvs-commit at gcc dot gnu.org
@ 2021-05-18  7:31 ` burnus at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-05-18  7:31 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED on mainline (GCC 12) and on the GCC 11 branch.

Thanks for the report!

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

end of thread, other threads:[~2021-05-18  7:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17  6:25 [Bug fortran/100633] New: ICE: gfc_trans_omp_workshare(): Bad statement code asolokha at gmx dot com
2021-05-17  8:10 ` [Bug fortran/100633] " marxin at gcc dot gnu.org
2021-05-17 11:23 ` cvs-commit at gcc dot gnu.org
2021-05-18  6:54 ` cvs-commit at gcc dot gnu.org
2021-05-18  7:31 ` burnus 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).