From owner-freebsd-fortran@freebsd.org Mon May 7 18:21:37 2018 Return-Path: Delivered-To: freebsd-fortran@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD843FB8F60 for ; Mon, 7 May 2018 18:21:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6BB3E8588A for ; Mon, 7 May 2018 18:21:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 263BCFB8F5E; Mon, 7 May 2018 18:21:36 +0000 (UTC) Delivered-To: fortran@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F35A5FB8F5D for ; Mon, 7 May 2018 18:21:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84F158585F for ; Mon, 7 May 2018 18:21:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id B69D91B10D for ; Mon, 7 May 2018 18:21:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w47ILYNw079139 for ; Mon, 7 May 2018 18:21:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w47ILYUG079138 for fortran@FreeBSD.org; Mon, 7 May 2018 18:21:34 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fortran@FreeBSD.org Subject: [Bug 228007] math/lapack: switch to flang Date: Mon, 07 May 2018 18:21:34 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: sgk@troutmask.apl.washington.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fortran@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2018 18:21:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228007 --- Comment #20 from sgk@troutmask.apl.washington.edu --- (In reply to robert.ayrapetyan from comment #19) > > From the other side, making flang a default compiler on > certain ports should not break anything, e.g. here is > armadillo built against mix of flang\gfortran: Are you sure? After hacking devel/flang to install. Simple testing by trying to compile and compile and run programs from gfortran's testsuite I have found % cd gfortran.fortran-torture/compile implicit_1.f90 F90-S-0000-Internal compiler error. create_ref:IM_BASE op#2 not based sym 302 (implicit_1.f90: 22) F90-S-0000-Internal compiler error. size_of: attempt to size assumed size character 0 (implicit_1.f90: 31) 0 inform, 0 warnings, 2 severes, 0 fatal for foo % cd ../execute Wrong code generated for data_3.f90, dep_fails.f90, der_io.f90, entry_6.f90, forall_3.f90, forall_5.f90, forall_6.f90, forall_7.f90, getarg_1.f90, intrinsic_nearest.f90, intrinsic_pack.f90, intrinsic_sign.f90, where18.f90, where_7.f90, and where_8.f90 This might be a gfortran extension, but I suspect a bug in flang. entry_2.f90 F90-S-0045-Data type of entry point e4 disagrees with function f3 (entry_2.f90: 22) F90-S-0045-Data type of entry point e3 disagrees with function f3 (entry_2.f90: 21) 0 inform, 0 warnings, 2 severes, 0 fatal for f3 Code generation bugs entry_4.f90 /tmp/entry_4-b1e98a.ll:167:14: error: expected '=3D' after instruction id ret void %18, !dbg !35 entry_7.f90 /tmp/entry_7-7901bf.ll:83:52: error: pointers to void are invalid - use i8* instead %35 =3D bitcast i64* %__master_entry_rslt346 to void* entry_8.f90 /tmp/entry_8-25b70f.ll:87:14: error: expected '=3D' after instruction id ret void %24, !dbg !32 ^ forall_1.f90 F90-F-0000-Internal compiler error. make_same_idx: illegal forall 2=20 (forall_1.f90: 59) There isn't an internal procedure in this program. This is a=20 bogus error message. intrinsic_associated.f90 F90-W-0155-END statement for internal procedure should be END SUBROUTINE (intrinsic_associated.f90: 125) 0 inform, 1 warnings, 0 severes, 0 fatal for associated_2 Flang does not support the TRAILZ intrinsic intrinsic_trailz.f90 F90-S-0038-Symbol, trailz, has not been explicitly declared (intrinsic_trailz.f90 ) 0 inform, 0 warnings, 1 severes, 0 fatal for test_trailz BTW, FreeBSD's bugzilla is probably a poor place to have a discussion concerning potential problems with flang. PS: for those interested more thorough testing see https://groups.google.com/forum/#!searchin/comp.lang.fortran/flang%7Csort:d= ate/comp.lang.fortran/AIHRQ2kJv3c/0BhngsA-BAAJ --=20 You are receiving this mail because: You are the assignee for the bug.=