public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marcos.vanella at nist dot gov" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgomp/114825] New: Compiler error using gfortran and OpenMP
Date: Tue, 23 Apr 2024 13:33:07 +0000	[thread overview]
Message-ID: <bug-114825-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 114825
           Summary: Compiler error using gfortran and OpenMP
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marcos.vanella at nist dot gov
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58016
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58016&action=edit
Fortran Module source to reproduce described error.

Hi we have found a compiler error when compiling a fortran module with
gfortran.
In the following minimal reproducing code snippet, the module DIVG contains
some derived types (BOUNDARY_PROP1_TYPE,WALL_TYPE), a contained subroutine
called DIVERGENCE_PART_1 which also contains a subroutine called
ENTHALPY_ADVECTION.

In DIVERGENCE_PART_1 there is a WALL_LOOP that has an !$OMP PARALLEL construct
with three PRIVATE variables IW (counter), WC (a pointer to an array WALL of
type WALL_TYPE) and B1 (a pointer to an array BOUNDARY_PROP1 of type
BOUNDARY_PROP1_TYPE). 
A WALL_LOOP_2 loop is also used in the contained routine ENTHALPY_ADVECTION
called at the end of DIVERGENCE_PART_1. This loop does the same tasks as the
previous and is not instrumented with OpenMP.

Compiling the divg.f90 file with GCC 11.4 or 13.2 in both Pop-OS Linux and Mac
OSX 14 gives the following error:

$ gfortran -c -save-temps -freport-bug -m64 -O0 -std=f2018 -ggdb -Wall
-Wcharacter-truncation -Wno-target-lifetime -fcheck=all -fbacktrace
-ffpe-trap=invalid,zero,overflow -frecursive -ffpe-summary=none
-fall-intrinsics -cpp -fopenmp divg.f90
during GIMPLE pass: omplower
divg.f90:44:52:

   44 | !$OMP PARALLEL DO PRIVATE(IW,WC,B1) SCHEDULE(GUIDED)
      |                                                    ^
internal compiler error: in gfc_omp_clause_default_ctor, at
fortran/trans-openmp.cc:746
Please submit a full bug report, with preprocessed source.
See <https://github.com/Homebrew/homebrew-core/issues> for instructions.

If we comment the ALLOCATABLE field ZZ_G in the derived type
BOUNDARY_PROP1_TYPE the module compiles without error.

Thank you for your time and attention.
Marcos

             reply	other threads:[~2024-04-23 13:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 13:33 marcos.vanella at nist dot gov [this message]
2024-04-23 14:10 ` [Bug fortran/114825] [11/12/13/14 Regression] Compiler error using gfortran and OpenMP since r5-1190 jakub at gcc dot gnu.org
2024-04-23 14:57 ` burnus at gcc dot gnu.org
2024-04-23 15:18 ` jakub at gcc dot gnu.org
2024-04-24 16:27 ` jakub at gcc dot gnu.org
2024-04-25 18:15 ` cvs-commit at gcc dot gnu.org
2024-04-25 18:23 ` [Bug fortran/114825] [11/12/13 " jakub at gcc dot gnu.org
2024-05-09  4:26 ` cvs-commit at gcc dot gnu.org
2024-05-09  8:17 ` [Bug fortran/114825] [11/12 " 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-114825-4@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).