LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 42338 - clang crashes on FreeBSD on the 'folly' project
Summary: clang crashes on FreeBSD on the 'folly' project
Status: NEW
Alias: None
Product: clang
Classification: Unclassified
Component: C++ (show other bugs)
Version: 8.0
Hardware: PC FreeBSD
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-19 22:17 PDT by Yuri
Modified: 2019-06-20 00:37 PDT (History)
6 users (show)

See Also:
Fixed By Commit(s):


Attachments
crash-cases.tar.xz (440.45 KB, application/x-xz)
2019-06-19 22:21 PDT, Yuri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri 2019-06-19 22:17:51 PDT
https://github.com/facebook/folly
Comment 1 Yuri 2019-06-19 22:21:16 PDT
Created attachment 22126 [details]
crash-cases.tar.xz
Comment 2 Dimitry Andric 2019-06-20 00:37:16 PDT
Yeah, I added a comment about this to https://reviews.llvm.org/rC363086.  Reduced test case (which asserts with 8.0.0 and 8.0.1, but not trunk after r363086): 

// clang -cc1 -triple x86_64-- -S -std=c++17 RecordIO-min.cpp
// Assertion failed: (!Init->isValueDependent()), function checkInitIsICE,
// file tools/clang/lib/AST/Decl.cpp, line 2342.
template <int> struct a;
template <class b, class> struct c {
  static constexpr int f = b ::d;
  c(a<f>);
};
template <class e, class g = int> c(e)->c<e, g>;

The question is whether it is feasible to backport the whole of r363086, which is fairly disruptive, or if there is another, smaller fix.