From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92653 invoked by alias); 17 Sep 2017 10:20:51 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 92641 invoked by uid 89); 17 Sep 2017 10:20:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.0 required=5.0 tests=BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,LIBERO,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=H*M:libero, H*F:D*libero.it, H*MI:libero, msys2 X-HELO: libero.it Received: from smtp-33-i5.italiaonline.it (HELO libero.it) (212.48.25.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 17 Sep 2017 10:20:49 +0000 Received: from oxapps-03-018.iol.local ([10.255.27.94]) by smtp-33.iol.local with SMTP id tWgvdYoQGs64StWgwdnIFk; Sun, 17 Sep 2017 12:20:46 +0200 x-libjamoibt: 1601 X-CNFS-Analysis: v=2.2 cv=EMx26xRC c=1 sm=1 tr=0 a=g8CaEAxhfDat+3VRREK9aQ==:117 a=dbwsuA7RNSAA:10 a=IkcTkHD0fZMA:10 a=rdsxqITDd-xkov97b0YA:9 a=QEXdDO2ut3YA:10 Date: Sun, 17 Sep 2017 10:20:00 -0000 From: Angelo Graziosi To: fortran@gcc.gnu.org Message-ID: <2144457572.355212.1505643645966@mail.libero.it> Subject: Warning not catched MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Originating-Client: open-xchange-appsuite x-libjamsun: AxBOA9IG9IyXDbwKKNEDu6xFKlUoc7xy x-libjamv: YnP0JB8nI6U= X-CMAE-Envelope: MS4wfMgXrDDwDMSsCsiB2sRFchgQiqHUD9GIKTkMMDLShGt5kDDUz0fStKM/kSQ3RhOX/rDOG4U3fyUOcz02gCKREOR2/6EJzKMwt4i67qdtb50gqwwQ+exo HIMoPnoNOsM6ta4VxGWkEHOFdHkSdMWy0muRY3MxT9+C/fwB/w2MsLLHkyyAjQQIGrU++nrCfBoH7w== X-SW-Source: 2017-09/txt/msg00047.txt.bz2 Consider this simple test case: program test_warn implicit none integer, parameter :: DP = selected_real_kind(12,60) real(DP), parameter :: Z0 = 0 integer :: b(5) b(1:5) = Z0 end program test_warn and compile it with: gfortran -Wall -O2 -c test_warn.f90 Now, only with gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) it prints the warning: test_warn.f90:9:11: b(1:5) = Z0 1 Warning: Possible change of value in conversion from REAL(8) to INTEGER(4) at (1) [-Wconversion] Instead the following more recent versions of gfortran do NOT emit any warning: 1) (on MSYS2, msys2 shell) Target: x86_64-pc-msys gcc version 6.3.0 (GCC) 2) (on MSYS2, mingw32 shell) Target: i686-w64-mingw32 gcc version 7.2.0 (Rev1, Built by MSYS2 project) 3) (on MSYS2, mingw64 shell) Target: x86_64-w64-mingw32 gcc version 7.2.0 (Rev1, Built by MSYS2 project) 4) (Win10 - Windows Subsystem for Linux) Target: x86_64-pc-linux-gnu gcc version 7.1.0 (GCC) 5) (on macOS 10.12 + MacPorts) Target: x86_64-apple-darwin16 gcc version 6.4.0 (MacPorts gcc6 6.4.0_0) (all Thread model: posix). Is this to be expected? (My mind says no..) Thanks, Angelo.