From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 18C693851165; Wed, 12 Oct 2022 14:18:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18C693851165 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665584312; bh=dW8OrUHOn978I8VRui+KtvYpi5HI/4zV/CgXWb7+t6k=; h=From:To:Subject:Date:From; b=J7mLx6W5YbIUVei+67fCy57GjwOmJLsO5TUFsFhkfyKQoonQGCoLog0ALwUhdpvXk 7CaTx43Ho2WJQZtqQY3jHiKe8Dmo1ZqCzhFq1PFyoyZ+ysBCz4Mo3+uwx7GBX5icn2 mNlzTNGBG3EFeFk8RABx+hoMsHAGwAzs2zoiXGFg= From: "ptw at tpointsw dot uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107237] New: Error: non-constant array in DATA statement (1) Date: Wed, 12 Oct 2022 14:18:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ptw at tpointsw dot uk 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 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=3D107237 Bug ID: 107237 Summary: Error: non-constant array in DATA statement (1) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: ptw at tpointsw dot uk Target Milestone: --- Apologies if this report is incomplete or blemished. Hopefully the example = is sufficiently concise that the problem will be easy to reproduce. Using gfortran under Windows 10, this apparently valid Fortran code: REAL A(4) DATA A(l), A(2), A(3), A(4) /0.0, 0.0, 0.0, 0.0/ PRINT *, A(1) END produces the reports: DATA A(l), A(2), A(3), A(4) /0.0, 0.0, 0.0, 0.0/ 1 Error: non-constant array in DATA statement (1) DATA A(l), A(2), A(3), A(4) /0.0, 0.0, 0.0, 0.0/ 1 Error: Data element below array lower bound at (1) Output from gfortran -v is as follows: Using built-in specs. COLLECT_GCC=3Dgfortran COLLECT_LTO_WRAPPER=3Dc:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper= .exe Target: mingw32 Configured with: ../src/gcc-6.3.0/configure --build=3Dx86_64-pc-linux-gnu --host=3Dmingw32 --with-gmp=3D/mingw --with-mpfr=3D/mingw --with-mpc=3D/min= gw --with-isl=3D/mingw --prefix=3D/mingw --disable-win32-registry --target=3Dm= ingw32 --with-arch=3Di586 --enable-languages=3Dc,c++,objc,obj-c++,fortran,ada --with-pkgversion=3D'MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=3D/mingw --with-libintl-prefix=3D/mingw --enable-libstdcxx-debug --with-tune=3Dgener= ic --enable-libgomp --disable-libvtv --enable-nls Thread model: win32 gcc version 6.3.0 (MinGW.org GCC-6.3.0-1) I get the same errors on a recently built Ubuntu platform.=