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

            Bug ID: 83622
           Summary: [8 Regression] Wrong code with derived type and
                    -fopenmp
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gmx dot de
  Target Milestone: ---

Created attachment 42981
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42981&action=edit
Reproducer

The attached sample code leads to wrong results when compiled with -fopenmp,
but works fine with -fno-openmp.  (Note that there are no OpenMP constructs
in the reproducer).

Output with -fopenmp (wrong):

 i =           1 fnct(i) = 'a '
 i =           2 fnct(i) = 'b '
 i =           3 fnct(i) = 'c '
 i =           4 fnct(i) = 'd '
 fnct = 'a a a a '
 equal = F F F F
 count =           0

Output with -fno-openmp (correct):

 i =           1 fnct(i) = 'a '
 i =           2 fnct(i) = 'b '
 i =           3 fnct(i) = 'c '
 i =           4 fnct(i) = 'd '
 fnct = 'a b c d '
 equal = F T F F
 count =           1

Reply via email to