From owner-freebsd-toolchain@freebsd.org Fri Jul 13 21:06:51 2018 Return-Path: Delivered-To: freebsd-toolchain@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 863EF102509B for ; Fri, 13 Jul 2018 21:06:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA1478F94; Fri, 13 Jul 2018 21:06:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 9B937570DC; Fri, 13 Jul 2018 23:06:43 +0200 (CEST) From: Dimitry Andric Message-Id: <0CAE4E5F-E501-4173-8716-72EAAEF5C55F@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_C790293D-CDC5-4B58-9D6F-4CD3C310FD4E"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Clang 6.0.[01]: UNREACHABLE executed Date: Fri, 13 Jul 2018 23:06:39 +0200 In-Reply-To: <51FD8F40-A5B8-4292-ACD4-A0105E428311@FreeBSD.org> Cc: freebsd-toolchain@freebsd.org To: Jonathan Anderson References: <95573ED5-49CD-4BC6-863D-849C1CAA774D@FreeBSD.org> <51FD8F40-A5B8-4292-ACD4-A0105E428311@FreeBSD.org> X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2018 21:06:51 -0000 --Apple-Mail=_C790293D-CDC5-4B58-9D6F-4CD3C310FD4E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 13 Jul 2018, at 18:45, Dimitry Andric wrote: >=20 > On 13 Jul 2018, at 14:30, Jonathan Anderson = wrote: >>=20 >> I recently ran into an unreachable statement execution in Clang 6, = both >> with v6.0.0 from the llvm60 package and v6.0.1 from HEAD (FreeBSD >> r335799 / LLVM r335540). I don't see this issue in Clang 5 or in the >> version that ships with macOS High Sierra (which they're calling = 9.1.0, >> but that's apparently more of a "marketing version" than a true = version >> number). >>=20 >> creduce managed to shrink my 2.8 MiB preprocessed sources down to a = 604 >> B test case: >>=20 >> https://gist.github.com/trombonehero/2da555bd1292be973f9d14c843c56ae5 >>=20 >> This isn't a valid C++ file (e.g., it cuts off after `return o` on = line >> 23), but I would expect it to cause compiler errors rather than a >> compiler crash. You can see the output from the crash at: >>=20 >> https://gist.github.com/trombonehero/8fce4a8f39ae121a2f9f14b45b0b65a1 >>=20 >> Any thoughts? >=20 > It doesn't crash for me, at least not with the command line you = provided > in the gist. Ah, I had a clang without assertions, but with assertions enabled, it indeed results in: Invalid operator call kind UNREACHABLE executed at = /usr/src/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp:1250! Abort trap This looks very much like https://bugs.llvm.org/show_bug.cgi?id=3D28793, which is also something about a lamdba function with an invalid or incomplete syntax. I will dig a bit further; if it is the same bug, and reproduces with clang trunk, I can bump the upstream bug, and/or ping a few people that might be able to fix it. -Dimitry --Apple-Mail=_C790293D-CDC5-4B58-9D6F-4CD3C310FD4E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCW0kUYAAKCRCwXqMKLiCW oz+ZAKDxO3VDkmna60zdDoK8zpF9LYWSYQCcCTCUVGSNafolfdDmf1B90jtGXzo= =V+jU -----END PGP SIGNATURE----- --Apple-Mail=_C790293D-CDC5-4B58-9D6F-4CD3C310FD4E--