gcc-11-20211127 is now available

2021-11-27 Thread GCC Administrator via Gcc
Snapshot gcc-11-20211127 is now available on
  https://gcc.gnu.org/pub/gcc/snapshots/11-20211127/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 11 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch 
releases/gcc-11 revision 7320f5d405177c82ed554188cad74d2ab4030b8f

You'll find:

 gcc-11-20211127.tar.xz   Complete GCC

  SHA256=212194169caceabca49ed5c21c4fa17a732c6bd3f0cbcc0e4b2d04296972540f
  SHA1=c0019d8282ebbe89e7e7e447861fb13173731fa7

Diffs from 11-20211120 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-11
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.


Question about builtin_free doesn't read memory

2021-11-27 Thread Bin.Cheng via Gcc
Hi,
In function ref_maybe_used_by_call_p_1, there is below code snippet
 /* The following builtins do not read from memory.  */
 case BUILT_IN_FREE:
 ...
   return false;

I am confused because free function does read from (and even write to)
memory pointed to by passed argument?
I am thinking DSE optimizations like:
  *ptr = value;
  free(ptr);
  *ptr = undef;
Does GCC take advantage of UB to eliminate the first store to ptr if
free is considered not reading memory?

Thanks,
bin