diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-pr33763.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-pr33763.patch | 160 |
1 files changed, 0 insertions, 160 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-pr33763.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-pr33763.patch deleted file mode 100644 index 6fc0a1f7c1..0000000000 --- a/meta/recipes-devtools/gcc/gcc-4.5.1/fedora/gcc43-pr33763.patch +++ /dev/null | |||
@@ -1,160 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [distribution: fedora] | ||
2 | 2007-11-06 Jakub Jelinek <jakub@redhat.com> | ||
3 | |||
4 | PR tree-optimization/33763 | ||
5 | * gcc.dg/pr33763.c: New test. | ||
6 | * g++.dg/opt/inline13.C: New test. | ||
7 | |||
8 | 2007-11-06 Jan Hubicka <jh@suse.cz> | ||
9 | |||
10 | PR tree-optimization/33763 | ||
11 | * tree-inline.c (expand_call_inline): Silently ignore always_inline | ||
12 | attribute for redefined extern inline functions. | ||
13 | |||
14 | Index: gcc/tree-inline.c | ||
15 | =================================================================== | ||
16 | --- gcc/tree-inline.c.orig 2010-03-18 13:07:13.000000000 -0700 | ||
17 | +++ gcc/tree-inline.c 2010-06-25 10:18:51.230139825 -0700 | ||
18 | @@ -3545,6 +3545,12 @@ | ||
19 | goto egress; | ||
20 | |||
21 | if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) | ||
22 | + /* For extern inline functions that get redefined we always | ||
23 | + silently ignored alway_inline flag. Better behaviour would | ||
24 | + be to be able to keep both bodies and use extern inline body | ||
25 | + for inlining, but we can't do that because frontends overwrite | ||
26 | + the body. */ | ||
27 | + && !cg_edge->callee->local.redefined_extern_inline | ||
28 | /* Avoid warnings during early inline pass. */ | ||
29 | && cgraph_global_info_ready) | ||
30 | { | ||
31 | Index: gcc/testsuite/gcc.dg/pr33763.c | ||
32 | =================================================================== | ||
33 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
34 | +++ gcc/testsuite/gcc.dg/pr33763.c 2010-06-25 10:18:51.234141302 -0700 | ||
35 | @@ -0,0 +1,60 @@ | ||
36 | +/* PR tree-optimization/33763 */ | ||
37 | +/* { dg-do compile } */ | ||
38 | +/* { dg-options "-O2" } */ | ||
39 | + | ||
40 | +typedef struct | ||
41 | +{ | ||
42 | + void *a; | ||
43 | + void *b; | ||
44 | +} T; | ||
45 | +extern void *foo (const char *, const char *); | ||
46 | +extern void *bar (void *, const char *, T); | ||
47 | +extern int baz (const char *, int); | ||
48 | + | ||
49 | +extern inline __attribute__ ((always_inline, gnu_inline)) int | ||
50 | +baz (const char *x, int y) | ||
51 | +{ | ||
52 | + return 2; | ||
53 | +} | ||
54 | + | ||
55 | +int | ||
56 | +baz (const char *x, int y) | ||
57 | +{ | ||
58 | + return 1; | ||
59 | +} | ||
60 | + | ||
61 | +int xa, xb; | ||
62 | + | ||
63 | +static void * | ||
64 | +inl (const char *x, const char *y) | ||
65 | +{ | ||
66 | + T t = { &xa, &xb }; | ||
67 | + int *f = (int *) __builtin_malloc (sizeof (int)); | ||
68 | + const char *z; | ||
69 | + int o = 0; | ||
70 | + void *r = 0; | ||
71 | + | ||
72 | + for (z = y; *z; z++) | ||
73 | + { | ||
74 | + if (*z == 'r') | ||
75 | + o |= 1; | ||
76 | + if (*z == 'w') | ||
77 | + o |= 2; | ||
78 | + } | ||
79 | + if (o == 1) | ||
80 | + *f = baz (x, 0); | ||
81 | + if (o == 2) | ||
82 | + *f = baz (x, 1); | ||
83 | + if (o == 3) | ||
84 | + *f = baz (x, 2); | ||
85 | + | ||
86 | + if (o && *f > 0) | ||
87 | + r = bar (f, "w", t); | ||
88 | + return r; | ||
89 | +} | ||
90 | + | ||
91 | +void * | ||
92 | +foo (const char *x, const char *y) | ||
93 | +{ | ||
94 | + return inl (x, y); | ||
95 | +} | ||
96 | Index: gcc/testsuite/g++.dg/opt/inline13.C | ||
97 | =================================================================== | ||
98 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
99 | +++ gcc/testsuite/g++.dg/opt/inline13.C 2010-06-25 10:18:51.261052137 -0700 | ||
100 | @@ -0,0 +1,60 @@ | ||
101 | +// PR tree-optimization/33763 | ||
102 | +// { dg-do compile } | ||
103 | +// { dg-options "-O2" } | ||
104 | + | ||
105 | +typedef struct | ||
106 | +{ | ||
107 | + void *a; | ||
108 | + void *b; | ||
109 | +} T; | ||
110 | +extern void *foo (const char *, const char *); | ||
111 | +extern void *bar (void *, const char *, T); | ||
112 | +extern int baz (const char *, int); | ||
113 | + | ||
114 | +extern inline __attribute__ ((always_inline, gnu_inline)) int | ||
115 | +baz (const char *x, int y) | ||
116 | +{ | ||
117 | + return 2; | ||
118 | +} | ||
119 | + | ||
120 | +int | ||
121 | +baz (const char *x, int y) | ||
122 | +{ | ||
123 | + return 1; | ||
124 | +} | ||
125 | + | ||
126 | +int xa, xb; | ||
127 | + | ||
128 | +static void * | ||
129 | +inl (const char *x, const char *y) | ||
130 | +{ | ||
131 | + T t = { &xa, &xb }; | ||
132 | + int *f = (int *) __builtin_malloc (sizeof (int)); | ||
133 | + const char *z; | ||
134 | + int o = 0; | ||
135 | + void *r = 0; | ||
136 | + | ||
137 | + for (z = y; *z; z++) | ||
138 | + { | ||
139 | + if (*z == 'r') | ||
140 | + o |= 1; | ||
141 | + if (*z == 'w') | ||
142 | + o |= 2; | ||
143 | + } | ||
144 | + if (o == 1) | ||
145 | + *f = baz (x, 0); | ||
146 | + if (o == 2) | ||
147 | + *f = baz (x, 1); | ||
148 | + if (o == 3) | ||
149 | + *f = baz (x, 2); | ||
150 | + | ||
151 | + if (o && *f > 0) | ||
152 | + r = bar (f, "w", t); | ||
153 | + return r; | ||
154 | +} | ||
155 | + | ||
156 | +void * | ||
157 | +foo (const char *x, const char *y) | ||
158 | +{ | ||
159 | + return inl (x, y); | ||
160 | +} | ||