summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0106-PR-c-48517.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-04-30 12:37:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 12:26:41 +0100
commit478deec11f3349d61b1a922f047dc958dc07262a (patch)
tree1843907b36de2bcb8f821d49d8c9a88014ef0dc7 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0106-PR-c-48517.patch
parentd42dccf886983ba14ccc868041d7bea0cf1a260e (diff)
downloadpoky-478deec11f3349d61b1a922f047dc958dc07262a.tar.gz
gcc-4.6.0: Backport FSF 4.6 branch patches
This is set of bugfixes that has been done on FSF gcc-4_2-branch since 4.6.0 was released They will roll into 4.6.1 release once that happens in coming approx 6 months time then we can simply remove them thats the reason so use a separate .inc file to define the SRC_URI additions (From OE-Core rev: b0d5b9f12adbce2c4a0df6059f5671188cd32293) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0106-PR-c-48517.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0106-PR-c-48517.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0106-PR-c-48517.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0106-PR-c-48517.patch
new file mode 100644
index 0000000000..8fba6af3b8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0106-PR-c-48517.patch
@@ -0,0 +1,51 @@
1From b58a503c5dbde32cbb9bd48ea16ff868d2023cf9 Mon Sep 17 00:00:00 2001
2From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Tue, 12 Apr 2011 06:53:13 +0000
4Subject: [PATCH 106/200] PR c/48517
5 * c-typeck.c (store_init_value): Set TREE_TYPE (decl) to
6 qualified type.
7
8 * gcc.c-torture/compile/pr48517.c: New test.
9
10
11git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172300 138bc75d-0d04-0410-961f-82ee72b054a4
12
13index a22bb73..fca369c 100644
14--- a/gcc/c-typeck.c
15+++ b/gcc/c-typeck.c
16@@ -5773,11 +5773,13 @@ store_init_value (location_t init_loc, tree decl, tree init, tree origtype)
17 /* For int foo[] = (int [3]){1}; we need to set array size
18 now since later on array initializer will be just the
19 brace enclosed list of the compound literal. */
20+ tree etype = strip_array_types (TREE_TYPE (decl));
21 type = build_distinct_type_copy (TYPE_MAIN_VARIANT (type));
22- TREE_TYPE (decl) = type;
23 TYPE_DOMAIN (type) = TYPE_DOMAIN (TREE_TYPE (cldecl));
24 layout_type (type);
25 layout_decl (cldecl, 0);
26+ TREE_TYPE (decl)
27+ = c_build_qualified_type (type, TYPE_QUALS (etype));
28 }
29 }
30 }
31new file mode 100644
32index 0000000..30b3ecb
33--- /dev/null
34+++ b/gcc/testsuite/gcc.c-torture/compile/pr48517.c
35@@ -0,0 +1,13 @@
36+/* PR c/48517 */
37+/* { dg-do compile } */
38+/* { dg-options "" } */
39+
40+void bar (const unsigned short *);
41+
42+void
43+foo (void)
44+{
45+ static const unsigned short array[] = (const unsigned short []) { 0x0D2B };
46+ const unsigned short *ptr = array;
47+ bar (ptr);
48+}
49--
501.7.0.4
51