Re: [PATCH] c-family: Fix ICE in get_atomic_generic_size [PR96545]

2020-08-11 Thread Marek Polacek via Gcc-patches
On Tue, Aug 11, 2020 at 10:50:28AM +0200, Jakub Jelinek via Gcc-patches wrote: > Hi! > > As the testcase shows, we would ICE if the type of the first argument of > various atomic builtins was pointer to (non-void) incomplete type, we would > assume that TYPE_SIZE_UNIT must be non-NULL. This patch

[PATCH] c-family: Fix ICE in get_atomic_generic_size [PR96545]

2020-08-11 Thread Jakub Jelinek via Gcc-patches
Hi! As the testcase shows, we would ICE if the type of the first argument of various atomic builtins was pointer to (non-void) incomplete type, we would assume that TYPE_SIZE_UNIT must be non-NULL. This patch diagnoses it instead. And also changes the TREE_CODE != INTEGER_CST check to !tree_fits