/usr/src/gcc-4.4/debian/patches/pr45112.diff is in gcc-4.4-source 4.4.7-1ubuntu2.
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # DP: Proposed fix for PR c++/45112
ChangeLog:
gcc/
PR c++/45112
* cp/decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
gcc/testsuite/
PR c++/45112
* testsuite/g++.dg/pr45112.C: New test.
Index: gcc/cp/decl.c
===================================================================
*** a/src/gcc/cp/decl.c (revision 162649)
--- b/src/gcc/cp/decl.c (working copy)
*************** duplicate_decls (tree newdecl, tree oldd
*** 2113,2118 ****
--- 2113,2122 ----
SET_DECL_INIT_PRIORITY (olddecl, DECL_INIT_PRIORITY (newdecl));
DECL_HAS_INIT_PRIORITY_P (olddecl) = 1;
}
+ /* Likewise for DECL_USER_ALIGN and DECL_PACKED. */
+ DECL_USER_ALIGN (olddecl) = DECL_USER_ALIGN (newdecl);
+ if (TREE_CODE (newdecl) == FIELD_DECL)
+ DECL_PACKED (olddecl) = DECL_PACKED (newdecl);
/* The DECL_LANG_SPECIFIC information in OLDDECL will be replaced
with that from NEWDECL below. */
Index: gcc/testsuite/g++.dg/pr45112.C
===================================================================
*** a/src/gcc/testsuite/g++.dg/pr45112.C (revision 0)
--- b/src/gcc/testsuite/g++.dg/pr45112.C (revision 0)
***************
*** 0 ****
--- 1,12 ----
+ /* { dg-do compile } */
+
+ struct JSString
+ {
+ unsigned char mLength;
+ static JSString unitStringTable[];
+ };
+
+ JSString JSString::unitStringTable[] __attribute__ ((aligned (8))) = { 1 };
+
+ int bug [__alignof__ (JSString::unitStringTable) >= 8 ? 1 : -1];
+
|