PR c/97206 - ICE in composite_type on declarations of a similar array types
authorMartin Sebor <msebor@redhat.com>
Wed, 30 Sep 2020 15:31:29 +0000 (09:31 -0600)
committerMartin Sebor <msebor@redhat.com>
Wed, 30 Sep 2020 18:59:53 +0000 (12:59 -0600)
commite808f3fdfa8f31066da19011b55acb8c0446c72d
treec263bdab839225d79c50032b48ec97d7acf0fab0
parent73ae6eb572515ad627b575a7fbdfdd47a4368e1c
PR c/97206 - ICE in composite_type on declarations of a similar array types

gcc/ChangeLog:

PR c/97206
* attribs.c (attr_access::array_as_string): Avoid modifying a shared
type in place and use build_type_attribute_qual_variant instead.

gcc/testsuite/ChangeLog:

PR c/97206
* gcc.dg/Warray-parameter-7.c: New test.
* gcc.dg/Warray-parameter-8.c: New test.
* gcc.dg/Wvla-parameter-5.c: New test.
gcc/attribs.c
gcc/testsuite/gcc.dg/Warray-parameter-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Warray-parameter-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wvla-parameter-5.c [new file with mode: 0644]