https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72787
--- Comment #6 from martin <ranjan.winner at gmail dot com> --- (In reply to Richard Biener from comment #1) > You can't rely on __builtin_object_size this way, please look up its > documentation. Hi Richard, Are you pointing to this line of test-case : size_t _sz = __builtin_object_size(dst, 1); That we can't rely on __builtin_object_size this way. I am getting wrong size only if I use __restrict qualifier, otherwise it calculate correct size. Also if we directly print the value of "__builtin_object_size(dst, 1)", then I am getting correct size. Kindly Confirm. Thanks, Ranjan Amit