[pushed] c++: build initializer_list in a loop [PR105838]

2023-06-12 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- I previously applied this change in r13-4565 but reverted it due to PR108071. That PR was then fixed by r13-4712, but I didn't re-apply this change then because we weren't making the array static; since r14-1500 for PR110070 we now make the

Re: [pushed] c++: build initializer_list in a loop [PR105838]

2022-12-13 Thread Stephan Bergmann via Gcc-patches
On 08/12/2022 19:45, Jason Merrill via Gcc-patches wrote: Tested x86_64-pc-linux-gnu, applying to trunk. Bisecting shows this started to break $ cat test.cc #include template struct ConstCharArrayDetector; template struct ConstCharArrayDetector { using Type = int; }; struct OUString { t

[pushed] c++: build initializer_list in a loop [PR105838]

2022-12-08 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- The previous patch avoided building an initializer_list at all when building a vector, but in situations where that isn't possible, we could still build the initializer_list with a loop over a constant array. This is represented using a VEC