Commit 946f9306 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/56564 (movdqa on possibly-8-byte-aligned struct with -O3)

	PR target/56564
	* varasm.c (decl_binds_to_current_def_p): Call binds_local_p
	target hook even for !TREE_PUBLIC decls.  If no resolution info
	is available, return false for common and external decls.

From-SVN: r199984
parent a7fca6f0
2013-06-12 Jakub Jelinek <jakub@redhat.com>
PR target/56564
* varasm.c (decl_binds_to_current_def_p): Call binds_local_p
target hook even for !TREE_PUBLIC decls. If no resolution info
is available, return false for common and external decls.
2013-06-12 Kaushik Phatak <kaushik.phatak@kpitcummins.com> 2013-06-12 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
* config/rl78/constraints.md (U): New constraint. * config/rl78/constraints.md (U): New constraint.
* config/rl78/rl78.md (*mulqi3_rl78,*mulhi3_rl78,*mulhi3_g13): Add * config/rl78/rl78.md (*mulqi3_rl78,*mulhi3_rl78,*mulhi3_g13): Add
valloc attribute. valloc attribute.
2013-06-11 Michael Meissner <meissner@linux.vnet.ibm.com> 2013-06-11 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/57589 PR target/57589
......
...@@ -6781,10 +6781,10 @@ bool ...@@ -6781,10 +6781,10 @@ bool
decl_binds_to_current_def_p (tree decl) decl_binds_to_current_def_p (tree decl)
{ {
gcc_assert (DECL_P (decl)); gcc_assert (DECL_P (decl));
if (!TREE_PUBLIC (decl))
return true;
if (!targetm.binds_local_p (decl)) if (!targetm.binds_local_p (decl))
return false; return false;
if (!TREE_PUBLIC (decl))
return true;
/* When resolution is available, just use it. */ /* When resolution is available, just use it. */
if (TREE_CODE (decl) == VAR_DECL if (TREE_CODE (decl) == VAR_DECL
&& (TREE_STATIC (decl) || DECL_EXTERNAL (decl))) && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
...@@ -6802,10 +6802,20 @@ decl_binds_to_current_def_p (tree decl) ...@@ -6802,10 +6802,20 @@ decl_binds_to_current_def_p (tree decl)
return resolution_to_local_definition_p (node->symbol.resolution); return resolution_to_local_definition_p (node->symbol.resolution);
} }
/* Otherwise we have to assume the worst for DECL_WEAK (hidden weaks /* Otherwise we have to assume the worst for DECL_WEAK (hidden weaks
binds locally but still can be overwritten). binds locally but still can be overwritten), DECL_COMMON (can be merged
with a non-common definition somewhere in the same module) or
DECL_EXTERNAL.
This rely on fact that binds_local_p behave as decl_replaceable_p This rely on fact that binds_local_p behave as decl_replaceable_p
for all other declaration types. */ for all other declaration types. */
return !DECL_WEAK (decl); if (DECL_WEAK (decl))
return false;
if (DECL_COMMON (decl)
&& (DECL_INITIAL (decl) == NULL
|| DECL_INITIAL (decl) == error_mark_node))
return false;
if (DECL_EXTERNAL (decl))
return false;
return true;
} }
/* A replaceable function or variable is one which may be replaced /* A replaceable function or variable is one which may be replaced
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment