Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jul 2018 23:06:39 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Jonathan Anderson <jonathan@freebsd.org>
Cc:        freebsd-toolchain@freebsd.org
Subject:   Re: Clang 6.0.[01]: UNREACHABLE executed
Message-ID:  <0CAE4E5F-E501-4173-8716-72EAAEF5C55F@FreeBSD.org>
In-Reply-To: <51FD8F40-A5B8-4292-ACD4-A0105E428311@FreeBSD.org>
References:  <95573ED5-49CD-4BC6-863D-849C1CAA774D@FreeBSD.org> <51FD8F40-A5B8-4292-ACD4-A0105E428311@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On 13 Jul 2018, at 18:45, Dimitry Andric <dim@FreeBSD.org> wrote:
> 
> On 13 Jul 2018, at 14:30, Jonathan Anderson <jonathan@freebsd.org> wrote:
>> 
>> 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).
>> 
>> creduce managed to shrink my 2.8 MiB preprocessed sources down to a 604
>> B test case:
>> 
>> https://gist.github.com/trombonehero/2da555bd1292be973f9d14c843c56ae5
>> 
>> 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:
>> 
>> https://gist.github.com/trombonehero/8fce4a8f39ae121a2f9f14b45b0b65a1
>> 
>> Any thoughts?
> 
> 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=28793,
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


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCW0kUYAAKCRCwXqMKLiCW
oz+ZAKDxO3VDkmna60zdDoK8zpF9LYWSYQCcCTCUVGSNafolfdDmf1B90jtGXzo=
=V+jU
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0CAE4E5F-E501-4173-8716-72EAAEF5C55F>