]> git.pld-linux.org Git - packages/gcc.git/commitdiff
- critical fix / wrong-code.
authorPaweł Sikora <pluto@pld-linux.org>
Wed, 19 Oct 2005 09:09:05 +0000 (09:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  [4.1 regression] Xorg broken, #pragma weak foo = bar no longer causes
                   bar to be referenced

Changed files:
    gcc-pr24295.patch -> 1.1

gcc-pr24295.patch [new file with mode: 0644]

diff --git a/gcc-pr24295.patch b/gcc-pr24295.patch
new file mode 100644 (file)
index 0000000..79cda07
--- /dev/null
@@ -0,0 +1,43 @@
+--- a/gcc/c-pragma.c   2005-07-19 20:19:12.000000000 +0000
++++ b/gcc/c-pragma.c   2005-10-19 09:03:52.461999480 +0000
+@@ -36,6 +36,7 @@
+ #include "tm_p.h"
+ #include "vec.h"
+ #include "target.h"
++#include "cgraph.h"
+ #define GCC_BAD(gmsgid) \
+   do { warning (OPT_Wpragmas, gmsgid); return; } while (0)
+@@ -310,7 +311,7 @@
+       alias_id = TREE_PURPOSE (t);
+       id = TREE_VALUE (t);
+-      if (TREE_VALUE (t) == NULL)
++      if (id == NULL)
+       continue;
+       decl = build_decl (FUNCTION_DECL, alias_id, default_function_type);
+@@ -330,6 +331,7 @@
+ {
+   tree name, value, x, decl;
+   enum cpp_ttype t;
++  struct cgraph_varpool_node *node;
+   value = 0;
+@@ -354,6 +356,15 @@
+     }
+   else
+     pending_weaks = tree_cons (name, value, pending_weaks);
++
++  decl = identifier_global_value (value);
++  if (decl && DECL_P (decl))
++    {
++      /* Force DECL into the assembler output no matter what.  */
++      node = cgraph_varpool_node (decl);
++      cgraph_varpool_mark_needed_node (node);
++      node->force_output = true;
++    }
+ }
+ #else
+ void
This page took 0.125346 seconds and 4 git commands to generate.