From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 91D153858D33; Fri, 28 Jul 2023 10:49:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 91D153858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690541373; bh=2wWoGG/frUtHoq8YRFw0vf2Mto4/Thw98uov8nIphkk=; h=From:To:Subject:Date:From; b=GsP9n/+aLgwNTBYyU3SkyzHFYW2GbBTeZNfDjv9vNEKqpltGmbiXXyKpHV2mY+Yzg hrmXt1KPW5+Yp17frZsn4fQxVTCRhgMmAz4iygp4roWsuqvfzh6zUtg6jQtcPD40Rr 06rZD6MRIUETFRrGZdanWer4HG2vl//9wVwgvXQI= From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/110842] New: [14 Regression] Openmp loops with KIND=16 DO loops Date: Fri, 28 Jul 2023 10:49:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110842 Bug ID: 110842 Summary: [14 Regression] Openmp loops with KIND=3D16 DO loops Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: tkoenig at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- gfortran with a reasonably current trunk gives wrong results for omp parallel: $ cat dynamic.f90=20 program main implicit none integer(kind=3D16) :: i, anfang, ende, delta anfang =3D 0 ende =3D 2**10 delta =3D 2**6 !$omp parallel do default(private) schedule(dynamic,1) do i=3Danfang, ende, delta !$omp critical print *,i !$omp end critical end do end program main $ gfortran dynamic.f90=20 $ ./a.out 0 64 128 192 256 320 384 448 512 576 640 704 768 832 896 960 1024 Without openmp, no problem. With openmp, some values are garbage: $ gfortran -fopenmp dynamic.f90=20 $ ./a.out 2584020860371700504877596135129104 768 192 704 960 128 896 64 2584020860371700504877596135130128 384 448 576 640 320 512 256 832 $ gfortran -v Es werden eingebaute Spezifikationen verwendet. COLLECT_GCC=3Dgfortran COLLECT_LTO_WRAPPER=3D/home/ig25/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto= -wrapper Ziel: x86_64-pc-linux-gnu Konfiguriert mit: ../trunk/configure --prefix=3D/home/ig25 --enable-languages=3Dc,c++,fortran --disable-multilib Thread-Modell: posix Unterst=C3=BCtzte LTO-Kompressionsalgorithmen: zlib gcc-Version 14.0.0 20230722 (experimental) [master r14-2725-g73cc6ce1294] (= GCC)=20 System compiler works fine: $ /usr/bin/gfortran -fopenmp dynamic.f90=20 $ ./a.out 0 64 832 256 320 960 576 192 896 640 128 384 704 768 512 448 1024 $ /usr/bin/gfortran -v Using built-in specs. COLLECT_GCC=3D/usr/bin/gfortran COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper OFFLOAD_TARGET_NAMES=3Dnvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=3D1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Ubuntu 11.3.0-1ubuntu1~22.04.1' --with-bugurl=3Dfile:///usr/share/doc/gcc-11/READM= E.Bugs --enable-languages=3Dc,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix= =3D/usr --with-gcc-major-version-only --program-suffix=3D-11 --program-prefix=3Dx86_64-linux-gnu- --enable-shared --enable-linker-build-= id --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --libdir=3D/usr/lib --enable-nls --enable-bootstrap --enable-clocale=3Dgnu --enable-libstdcxx-debug --enable-libstdcxx-time=3Dyes --with-default-libstdcxx-abi=3Dnew --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-= zlib --enable-libphobos-checking=3Drelease --with-target-system-zlib=3Dauto --enable-objc-gc=3Dauto --enable-multiarch --disable-werror --enable-cet --with-arch-32=3Di686 --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --with-tune=3Dgeneric --enable-offload-targets=3Dnvptx-none=3D/build/gcc-11-aYxV0E/gcc-11-11.3.0/= debian/tmp-nvptx/usr,amdgcn-amdhsa=3D/build/gcc-11-aYxV0E/gcc-11-11.3.0/deb= ian/tmp-gcn/usr --without-cuda-driver --enable-checking=3Drelease --build=3Dx86_64-linux-gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linux-gnu --with-build-config=3Dbootstrap-lto-lean --enable-link-serialization=3D2 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04.1)=