]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix PR ipa/65059.
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Feb 2015 12:28:40 +0000 (12:28 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Feb 2015 12:28:40 +0000 (12:28 +0000)
PR ipa/65059
* ipa-comdats.c (ipa_comdats): Do not categorize thunks to
external functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220733 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ipa-comdats.c

index 893f1124c72d73f2564953eac4f733ce2ab17386..2718a5c4ce36d446399d93dcf020ebd55bb7d477 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-16  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/65059
+       * ipa-comdats.c (ipa_comdats): Do not categorize thunks to
+       external functions.
+
 2015-02-15  Sandra Loosemore  <sandra@codesourcery.com>
 
        * doc/bugreport.texi: Adjust section titles throughout the file
index ad5945f468d9d16500f70a58302c9ceed2506094..9f43f299dbbff1f8359eb6c1b8c30100ff027389 100644 (file)
@@ -328,9 +328,14 @@ ipa_comdats (void)
 
   FOR_EACH_DEFINED_SYMBOL (symbol)
     {
+      struct cgraph_node *fun;
       symbol->aux = NULL; 
       if (!symbol->get_comdat_group ()
          && !symbol->alias
+         /* Thunks to external functions do not need to be categorized.  */
+         && (!(fun = dyn_cast <cgraph_node *> (symbol))
+             || !fun->thunk.thunk_p
+             || fun->function_symbol ()->definition)
          && symbol->real_symbol_p ())
        {
          tree *val = map.get (symbol);