On Sat, Jan 27, 2018 at 1:21 AM, Jakub Jelinek <ja...@redhat.com> wrote: > Hi! > > resolve_charlen is going to error on ilp32 target charlens above what > can fit into 32-bit signed int, but add_init_expr_to_sym is done before > resolve_charlen, allocating huge amounts of memory in those cases > when we'll error later is just waste of compile time if running on 64-bit > host with enough memory, or will unnecessarily ICE due to out of memory > otherwise. > > Another option would be to emit the error resolve_charlen is going to > emit and arrange for it not to be emitted afterwards, this just seemed > to be easier. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
Ok, thanks. > It would be nice if the FE had some way to express very large repetitive > EXPR_CONSTANT more efficiently, say by not allocating the memory for > the rest which is filled only by ' ', or by allowing to say this and this > is repeated after the initial portion this many times. Yes, we probably want to give up on populating large objects at compile-time long before we hit the 2 GB limit. For some cases this works already, for others it doesn't.. -- Janne Blomqvist