Re: [PATCH] Objective-C: fix crash with -fobjc-nilcheck

2021-08-14 Thread Matt Jacobson via Gcc-patches
> On Aug 14, 2021, at 5:25 AM, Iain Sandoe wrote: > > 1/ please can you either post using a mailer that doesn’t mangle patches or > put the patch as a plain text attachment > (pushing to a git branch somewhere public also works for me, but maybe not > for all reviewers) > - for small

Re: [PATCH] Objective-C: fix crash with -fobjc-nilcheck

2021-08-14 Thread Iain Sandoe via Gcc-patches
Hi Matt, > On 14 Aug 2021, at 09:14, Matt Jacobson via Gcc-patches > wrote: > > When -fobjc-nilcheck is enabled, messages that result in a struct type should > yield a zero-initialized struct when sent to nil. Currently, the frontend > crashes when it encounters this situation. This patch

[PATCH] Objective-C: fix crash with -fobjc-nilcheck

2021-08-14 Thread Matt Jacobson via Gcc-patches
When -fobjc-nilcheck is enabled, messages that result in a struct type should yield a zero-initialized struct when sent to nil. Currently, the frontend crashes when it encounters this situation. This patch fixes the crash by generating the tree for the `{}` initializer. Tested by running the