[Bug middle-end/44384] builtin_object_size_ treatment of multidimensional arrays is unexpected

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Aug 19 02:19:00 GMT 2016


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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-08-19
          Component|c                           |middle-end
     Ever confirmed|0                           |1
      Known to fail|                            |4.5.3, 4.8.3, 4.9.3, 5.3.0,
                   |                            |6.1.0, 7.0

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
I confirm this on the basis of the test case submitted in bug 77293.  Type-1
__builtin_object_size results for multidimensional arrays are inconsistent
within the same program and incongruous with the manual.  The inconsistency
affects not just users who directly rely on the built-in to implement checking
for their own functions (other than the Glibc subset) but also for users of
_FORTIFY_SOURCE (such as strcpy, as shown in bug 77293).


More information about the Gcc-bugs mailing list