diff mbox

[i686] : Temporary fir for PR63566

Message ID 5440DB05.9070301@suse.cz
State New
Headers show

Commit Message

Martin Liška Oct. 17, 2014, 9:01 a.m. UTC
Hello.

After IRC discussion, IPA ICF will set local flag to false for both original and node that becomes an alias.
That will enforce equal calling convention to be use.

i686-pc-linux bootstrap has been still running, I will commit the fix as soon as it finishes.
I consider it as pre-approved.

Thanks you,
Martin
gcc/ChangeLog:

2014-10-17  Martin Liska  <mliska@suse.cz>

	* ipa-icf.c (sem_function::merge): Local flags are set to false
	to enforce equal calling convention to be used.
	* opts.c (common_handle_option): Indentation fix.
diff mbox

Patch

diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index f7510b3..0e6bd9a 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -630,6 +630,11 @@  sem_function::merge (sem_item *alias_item)
       cgraph_node::create_alias (alias_func->decl, decl);
       alias->resolve_alias (original);
 
+      /* Workaround for PR63566 that forces equal calling convention
+	 to be used.  */
+      alias->local.local = false;
+      original->local.local = false;
+
       if (dump_file)
 	fprintf (dump_file, "Callgraph alias has been created.\n\n");
     }
diff --git a/gcc/opts.c b/gcc/opts.c
index dc8ddf4..3054196 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1982,8 +1982,8 @@  common_handle_option (struct gcc_options *opts,
       break;
 
     case OPT_fipa_icf:
-	opts->x_flag_ipa_icf_functions = value;
-	opts->x_flag_ipa_icf_variables = value;
+      opts->x_flag_ipa_icf_functions = value;
+      opts->x_flag_ipa_icf_variables = value;
       break;
 
     default: