https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66090

--- Comment #10 from Andrew <wad at infinet dot ru> ---
(In reply to Christian Prochaska from comment #0)
> test.c:
> 
> void func()
> {
>     unsigned int i;
> 
>     unsigned int *ptr = (unsigned int*)0xfffff000;
> 
>     for (i = 0; i < 1024; i++)
>         *(ptr++) = 0;
> }

There is no attempts to check pointer for NULL.
But, this is hidden attempt to substitute one test (i < 1024) to another (ptr
!= NULL), which will be the result of unexpected "always true".

And by the way:

void *ptr = malloc(1024);

if (ptr == NULL) /* always false ? Never panic()? */
  panic();

Reply via email to