On Thu, 3 Dec 2015, Marek Polacek wrote: > > I think you also need to decrement orig_qual_indirect, which counts the > > number of levels of array type derivation from orig_qual_type. > > Thus: > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2015-12-03 Marek Polacek <pola...@redhat.com> > > PR c/68668 > * c-decl.c (grokdeclarator): When creating a PARM_DECL of ARRAY_TYPE, > use TREE_TYPE of orig_qual_type. Decrement ORIG_QUAL_INDIRECT.
On further consideration: Removing one level of array type derivation from type means it is one fewer levels indirect from the original version of orig_qual_type. So I think you should actually decrement orig_qual_indirect without changing orig_qual_type. But, if orig_qual_indirect is indirect, in that case you may get better results from changing orig_qual_type without decrementing orig_qual_indirect. -- Joseph S. Myers jos...@codesourcery.com