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

            Bug ID: 103039
           Summary: Segfault with openmp block within a select type block
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mscfd at gmx dot net
  Target Milestone: ---

Created attachment 51720
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51720&action=edit
seltype.f90

The attached code compiles and executes fine with gfortran-11.1, but it first
shows warnings during compilation and then fails with a segfault with the
current master branch.
Compilation is done with: gfortran-12 -fopenmp -Wall seltype.f90
Output should be just the number 110.

In our code I have also seen lots of similar warnings with openmp blocks within
associate(.. => ...) blocks and related segfaults, but I could not come up with
a simple testcase.

Reply via email to