[Bug bootstrap/78817] stage2 bootstrap failure in vec.h:1613:5: error: argument 1 null where non-null expected after r243661

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 15 14:29:00 GMT 2016


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

--- Comment #8 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
trippels@gcc2-power8 linux % cat sm_ftl.i
int sm_read_sector_zone;
int *sm_read_sector_buffer = &sm_read_sector_zone;
int sm_read_sector() {
  __builtin_memset(sm_read_sector_buffer, 0, 1);
again:
  if (sm_read_sector_zone)
    if (!sm_read_sector_buffer)
      return 0;
  goto again;
}
void sm_init_zone() {
  sm_read_sector();
  sm_read_sector();
}

trippels@gcc2-power8 linux % gcc -c -Wall -O2 sm_ftl.i
trippels@gcc2-power8 linux % gcc -c -Wall -O3 sm_ftl.i
sm_ftl.i: In function ‘sm_init_zone’:
sm_ftl.i:4:3: warning: argument 1 null where non-null expected [-Wnonnull]
   __builtin_memset(sm_read_sector_buffer, 0, 1);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sm_ftl.i:4:3: note: in a call to built-in function ‘__builtin_memset’


More information about the Gcc-bugs mailing list