public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/114825] New: Compiler error using gfortran and OpenMP
@ 2024-04-23 13:33 marcos.vanella at nist dot gov
  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
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: marcos.vanella at nist dot gov @ 2024-04-23 13:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

end of thread, other threads:[~2024-05-09  8:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-23 13:33 [Bug libgomp/114825] New: Compiler error using gfortran and OpenMP marcos.vanella at nist dot gov
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

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