[PATCH] handle vla plus offset in strlen (PR 90662)
Wed Jun 5 22:51:00 GMT 2019
One of my new tests for the strlen/sprintf integration tripped
over an incomplete handling of VLAs by the strlen pass. Where
it can determine the length of a substring at some offset with
other kinds of arrays, the pass fails with VLAs because they
are represented as pointers to arrays.
The attached patch adds the missing handling so that code like
the following can be fully folded even for VLAs.
int f (int n)
strcpy (a, "12345");
if (strlen (&a) != 3)
Tested on x86_64-linux.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10171 bytes
Desc: not available
More information about the Gcc-patches