Avoid assuming a VLA access specification string contains a closing bracket (PR middle-end/97189).
Resolves:
PR middle-end/97189 - ICE on redeclaration of a function with VLA argument and attribute access
gcc/ChangeLog:
PR middle-end/97189
* attribs.c (attr_access::array_as_string): Avoid assuming a VLA
access specification string contains a closing bracket.
gcc/c-family/ChangeLog:
PR middle-end/97189
* c-attribs.c (append_access_attr): Use the function declaration
location for a warning about an attribute access argument.
gcc/testsuite/ChangeLog:
PR middle-end/97189
* gcc.dg/attr-access-2.c: Adjust caret location.
* gcc.dg/Wvla-parameter-6.c: New test.
* gcc.dg/Wvla-parameter-7.c: New test.