Commit f46835f5 by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/41801 (VTA: ICE in loc_cmp.)

	PR debug/41801
	* builtins.c (get_builtin_sync_mem): Expand loc in ptr_mode,
	call convert_memory_address on addr.

	* g++.dg/ext/sync-3.C: New test.

From-SVN: r153669
parent 6ac719d3
......@@ -4,6 +4,10 @@
vt_expand_loc unnecessarily when location is not a register nor
memory.
PR debug/41801
* builtins.c (get_builtin_sync_mem): Expand loc in ptr_mode,
call convert_memory_address on addr.
PR target/41762
* config/i386/i386.c (ix86_pic_register_p): Don't call
rtx_equal_for_cselib_p for VALUEs discarded as useless.
......@@ -5656,7 +5656,8 @@ get_builtin_sync_mem (tree loc, enum machine_mode mode)
{
rtx addr, mem;
addr = expand_expr (loc, NULL_RTX, Pmode, EXPAND_SUM);
addr = expand_expr (loc, NULL_RTX, ptr_mode, EXPAND_SUM);
addr = convert_memory_address (Pmode, addr);
/* Note that we explicitly do not want any alias information for this
memory, so that we kill all other live memories. Otherwise we don't
......
2009-10-28 Jakub Jelinek <jakub@redhat.com>
PR debug/41801
* g++.dg/ext/sync-3.C: New test.
PR target/41762
* gcc.dg/pr41762.c: New test.
......
// PR debug/41801
// { dg-do compile }
// { dg-options "-O2 -g" }
struct T
{
void
foo () volatile
{
__sync_lock_release (&t);
__sync_synchronize ();
}
bool t;
};
int
main ()
{
T t = { false };
t.foo ();
}
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