From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 645B63851C15; Wed, 3 Jun 2020 15:13:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 645B63851C15 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591197200; bh=1fuGuNimZt7gbctb+eiK05Z3H+Zy7zTMjnUutY3eDoE=; h=From:To:Subject:Date:From; b=SV+c6wvCuo3bvZLYGI26nWgCnU1UNeN9GvZ23s1beWHSKXGAnzGsr1MzTgruzEB1X laXgKFMdbgWIVTB5IxGuS7fNChR6aKQeJ4dydKgUdeT56PyUZF7cetLxJ9RCUDNnLm BOEEnMZbo/HxAjiHEkHg6h/1MT/cruiJ4RkAkFx0= From: "vincent.lafage at in2p3 dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/95500] New: Segfault compiling extra interface on intrinsic Date: Wed, 03 Jun 2020 15:13:20 +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: 9.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vincent.lafage at in2p3 dot fr 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 attachments.created 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 15:13:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95500 Bug ID: 95500 Summary: Segfault compiling extra interface on intrinsic Product: gcc Version: 9.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: vincent.lafage at in2p3 dot fr Target Milestone: --- Created attachment 48669 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48669&action=3Dedit Source file for the minimal test case When compiling the following sample minimal test case (named test_intrinsic.f90) program test_intrinsic implicit none intrinsic :: alog intrinsic :: dlog real (4), parameter :: one =3D 1 interface ln procedure :: alog, dlog end interface ln write (*, *) 'ln 1', ln (one) end program test_intrinsic through $ gfortran -Wall -Wextra test_intrinsic.f90 I ended-up with the following failure: test_intrinsic.f90:11:0: 11 | write (*, *) 'ln 1', ln (one) |=20 internal compiler error: Segmentation fault 0x7f4068d23fdf ??? =20=20=20=20=20=20=20 /build/glibc-TrjWJf/glibc-2.29/signal/../sysdeps/unix/sysv/linux/x86_64/sig= action.c:0 0x7f4068d10bba __libc_start_main ../csu/libc-start.c:308 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. I confirm that it is a longstanding bug, as I get the same problem with gfortran-4.9, gfortran-5, gfortran-6, gfortran-7, gfortran-8 as well. (Trying with other brands of compiler, g95, pgfortran, flang, and an old if= ort reported error without segfaulting) Getting the backtrace with valgrind: $ valgrind -s -v --leak-check=3Dfull --show-reachable=3Dyes --show-leak-kin= ds=3Dall --leak-resolution=3Dhigh --num-callers=3D100 --trace-children=3Dyes --track= -fds=3Dyes --log-file=3DValgrind_gfortran_report4.txt gfortran -v -Wall -Wextra test_intrinsic.f90 =E2=80=A6 =3D=3D891734=3D=3D 1 errors in context 1 of 1: =3D=3D891734=3D=3D Invalid read of size 1 =3D=3D891734=3D=3D at 0x135083C: gfc_conv_expr_reference(gfc_se*, gfc_ex= pr*, bool) (in /usr/lib/gcc/x86_64-linux-gnu/9/f951) =3D=3D891734=3D=3D by 0x1385548: gfc_trans_transfer(gfc_code*) (in /usr/lib/gcc/x86_64-linux-gnu/9/f951) =3D=3D891734=3D=3D by 0x130D669: ??? (in /usr/lib/gcc/x86_64-linux-gnu/9= /f951) =3D=3D891734=3D=3D by 0x137FA9C: ??? (in /usr/lib/gcc/x86_64-linux-gnu/9= /f951) =3D=3D891734=3D=3D by 0x130D689: ??? (in /usr/lib/gcc/x86_64-linux-gnu/9= /f951) =3D=3D891734=3D=3D by 0x133F1F5: gfc_generate_function_code(gfc_namespac= e*) (in /usr/lib/gcc/x86_64-linux-gnu/9/f951) =3D=3D891734=3D=3D by 0x128CF26: gfc_parse_file() (in /usr/lib/gcc/x86_64-linux-gnu/9/f951) =3D=3D891734=3D=3D by 0x1309D9F: ??? (in /usr/lib/gcc/x86_64-linux-gnu/9= /f951) =3D=3D891734=3D=3D by 0x143CC26: ??? (in /usr/lib/gcc/x86_64-linux-gnu/9= /f951) =3D=3D891734=3D=3D by 0xD9A415: toplev::main(int, char**) (in /usr/lib/gcc/x86_64-linux-gnu/9/f951) =3D=3D891734=3D=3D by 0xD9C4CE: main (in /usr/lib/gcc/x86_64-linux-gnu/9= /f951) =3D=3D891734=3D=3D Address 0x50 is not stack'd, malloc'd or (recently) fre= e'd =3D=3D891734=3D=3D=20 =3D=3D891734=3D=3D ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 f= rom 0) $ gfortran --version GNU Fortran (Debian 9.2.1-4) 9.2.1 20190821 $ uname -a Linux serval 5.4.0-0.bpo.4-amd64 #1 SMP Debian 5.4.19-1~bpo10+1 (2020-03-09) x86_64 GNU/Linux $ gfortran -v -Wall -Wextra test_intrinsic.f90 Driving: gfortran -v -Wall -Wextra test_intrinsic.f90 -l gfortran -l m -shared-libgcc Using built-in specs. COLLECT_GCC=3Dgfortran COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper OFFLOAD_TARGET_NAMES=3Dnvptx-none:hsa OFFLOAD_TARGET_DEFAULT=3D1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Debian 9.2.1-4' --with-bugurl=3Dfile:///usr/share/doc/gcc-9/README.Bugs --enable-languages=3Dc,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix= =3D/usr --with-gcc-major-version-only --program-suffix=3D-9 --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 --with-target-system-zlib=3Dauto --enable-multiarch --disable-werror --with-arch-32=3Di686 --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --with-tune=3Dgeneric --enable-offload-targets=3Dnvptx-no= ne,hsa --without-cuda-driver --enable-checking=3Drelease --build=3Dx86_64-linux-gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linux-gnu Thread model: posix gcc version 9.2.1 20190821 (Debian 9.2.1-4)=20 COLLECT_GCC_OPTIONS=3D'-v' '-Wall' '-Wextra' '-shared-libgcc' '-mtune=3Dgen= eric' '-march=3Dx86-64' /usr/lib/gcc/x86_64-linux-gnu/9/f951 test_intrinsic.f90 -quiet -dumpbase test_intrinsic.f90 -mtune=3Dgeneric -march=3Dx86-64 -auxbase test_intrinsic= -Wall -Wextra -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/9/finclude -o /tmp/ccgGzgc9.s GNU Fortran (Debian 9.2.1-4) version 9.2.1 20190821 (x86_64-linux-gnu) compiled by GNU C version 9.2.1 20190821, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.20-GMP GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D131= 072 GNU Fortran2008 (Debian 9.2.1-4) version 9.2.1 20190821 (x86_64-linux-gnu) compiled by GNU C version 9.2.1 20190821, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.20-GMP GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D131= 072 test_intrinsic.f90:11:0: 11 | write (*, *) 'ln 1', ln (one) |=20 internal compiler error: Segmentation fault 0x7fd0b7015fdf ??? =20=20=20=20=20=20=20 /build/glibc-TrjWJf/glibc-2.29/signal/../sysdeps/unix/sysv/linux/x86_64/sig= action.c:0 0x7fd0b7002bba __libc_start_main ../csu/libc-start.c:308 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=