summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-02 00:11:20 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-02 00:11:20 +0000
commiteb52d13a0ded34ffdec0fbcb892fcb041e6691a0 (patch)
tree24de65c7de3de7f1f82248b440ebe5639bb4788c /gcc/c-decl.c
parentbecfaa6206281ee8bb5d22ca461fa08568e7dc8c (diff)
downloadgcc-eb52d13a0ded34ffdec0fbcb892fcb041e6691a0.tar.gz
PR middle-end/33272
* c-decl.c (grokdeclarator): Apply qualifiers to type of parameter decayed from array. testsuite: * gcc.dg/c99-arraydecl-3.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128018 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 714cf62ba03..d2f4832aafb 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -4719,6 +4719,8 @@ grokdeclarator (const struct c_declarator *declarator,
type = c_build_qualified_type (type, type_quals);
type = build_pointer_type (type);
type_quals = array_ptr_quals;
+ if (type_quals)
+ type = c_build_qualified_type (type, type_quals);
/* We don't yet implement attributes in this context. */
if (array_ptr_attrs != NULL_TREE)