aboutsummaryrefslogtreecommitdiff
path: root/4.6.0
diff options
context:
space:
mode:
authorRyan Hill <rhill@gentoo.org>2011-04-13 02:42:46 +0000
committerRyan Hill <rhill@gentoo.org>2011-04-13 02:42:46 +0000
commitb97d451f2f60496446fd1bd40684b2785563c97c (patch)
treed604c9e42f17706f7ca1980157cdfbf0a6d9e420 /4.6.0
parentAdd patch for PR48377. (diff)
downloadgcc-patches-b97d451f2f60496446fd1bd40684b2785563c97c.tar.gz
gcc-patches-b97d451f2f60496446fd1bd40684b2785563c97c.tar.bz2
gcc-patches-b97d451f2f60496446fd1bd40684b2785563c97c.zip
Add patch for PR48517.
Diffstat (limited to '4.6.0')
-rw-r--r--4.6.0/gentoo/77_all_pr48517_4.6.1_ICE-build_unary_op.patch38
-rw-r--r--4.6.0/gentoo/README.history3
2 files changed, 40 insertions, 1 deletions
diff --git a/4.6.0/gentoo/77_all_pr48517_4.6.1_ICE-build_unary_op.patch b/4.6.0/gentoo/77_all_pr48517_4.6.1_ICE-build_unary_op.patch
new file mode 100644
index 0000000..a49cf8a
--- /dev/null
+++ b/4.6.0/gentoo/77_all_pr48517_4.6.1_ICE-build_unary_op.patch
@@ -0,0 +1,38 @@
+ICE in build_unary_op, at c-typeck.c:3786
+
+http://gcc.gnu.org/PR48517
+
+
+--- a/gcc/c-typeck.c
++++ b/gcc/c-typeck.c
+@@ -5773,11 +5773,13 @@ store_init_value (location_t init_loc, tree decl, tree init, tree origtype)
+ /* For int foo[] = (int [3]){1}; we need to set array size
+ now since later on array initializer will be just the
+ brace enclosed list of the compound literal. */
++ tree etype = strip_array_types (TREE_TYPE (decl));
+ type = build_distinct_type_copy (TYPE_MAIN_VARIANT (type));
+- TREE_TYPE (decl) = type;
+ TYPE_DOMAIN (type) = TYPE_DOMAIN (TREE_TYPE (cldecl));
+ layout_type (type);
+ layout_decl (cldecl, 0);
++ TREE_TYPE (decl)
++ = c_build_qualified_type (type, TYPE_QUALS (etype));
+ }
+ }
+ }
+--- /dev/null
++++ b/gcc/testsuite/gcc.c-torture/compile/pr48517.c
+@@ -0,0 +1,13 @@
++/* PR c/48517 */
++/* { dg-do compile } */
++/* { dg-options "" } */
++
++void bar (const unsigned short *);
++
++void
++foo (void)
++{
++ static const unsigned short array[] = (const unsigned short []) { 0x0D2B };
++ const unsigned short *ptr = array;
++ bar (ptr);
++}
diff --git a/4.6.0/gentoo/README.history b/4.6.0/gentoo/README.history
index 67c4973..3809f60 100644
--- a/4.6.0/gentoo/README.history
+++ b/4.6.0/gentoo/README.history
@@ -1,8 +1,9 @@
-1.2 [pending]
+1.2 2011-04-12
+ 01_all_joined-cpp-defs.patch
U 10_all_default-fortify-source.patch
+ 75_all_pr48335-4.6.1-ICE.patch
+ 76_all_pr48377_4.6.1_O3-wrong-code.patch
+ + 77_all_pr48517_4.6.1_ICE-build_unary_op.patch
1.1 2011-04-03
U 10_all_default-fortify-source.patch