/usr/src/gcc-4.6/debian/patches/pr48226.diff is in gcc-4.6-source 4.6.4-6ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # DP: Fix PR target/48226, Allow Iterator::vector vector on powerpc with VSX.
--- /dev/null
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr48226.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O3 -mcpu=power7" } */
+
+/* The bug shows up if you compile with -maltivec or -mcpu=power7, due to one
+ of the vector's being eliminated due to rs6000_macro_to_expand being called
+ recursively. */
+
+struct vector {
+ float v[4];
+};
+
+struct vector vector = { 1.0, 2.0, 3.0, 4.0 };
--- a/src/gcc/config/rs6000/rs6000-c.c
+++ b/src/gcc/config/rs6000/rs6000-c.c
@@ -182,7 +182,10 @@
expand_this = C_CPP_HASHNODE (__vector_keyword);
expand_bool_pixel = __bool_keyword;
}
- else if (ident)
+ /* The boost libraries have code with Iterator::vector vector in it. If
+ we allow the normal handling, this module will be called recursively,
+ and the vector will be skipped.; */
+ else if (ident && (ident != C_CPP_HASHNODE (__vector_keyword)))
{
enum rid rid_code = (enum rid)(ident->rid_code);
if (ident->type == NT_MACRO)
|