mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-25 01:30:44 +08:00
re PR middle-end/60908 (compiler bug related to trans-mem.c)
PR middle-end/60908 * trans-mem.c (tm_region_init): Mark entry block as visited. testsuite/ * gcc.dg/tm/pr60908.c: New test. From-SVN: r232839
This commit is contained in:
parent
dcbc087996
commit
ffc445f486
@ -1,3 +1,8 @@
|
||||
2016-01-26 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR middle-end/60908
|
||||
* trans-mem.c (tm_region_init): Mark entry block as visited.
|
||||
|
||||
2016-01-26 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
PR other/69006
|
||||
|
@ -1,3 +1,7 @@
|
||||
2016-01-26 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* gcc.dg/tm/pr60908.c: New test.
|
||||
|
||||
2016-01-26 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
PR other/69006
|
||||
|
15
gcc/testsuite/gcc.dg/tm/pr60908.c
Normal file
15
gcc/testsuite/gcc.dg/tm/pr60908.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fgnu-tm" } */
|
||||
|
||||
int t, v;
|
||||
|
||||
int
|
||||
foo (void)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
__transaction_atomic { v++; }
|
||||
if (t)
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -2039,16 +2039,17 @@ tm_region_init (struct tm_region *region)
|
||||
struct tm_region *old_region;
|
||||
auto_vec<tm_region *> bb_regions;
|
||||
|
||||
all_tm_regions = region;
|
||||
bb = single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun));
|
||||
|
||||
/* We could store this information in bb->aux, but we may get called
|
||||
through get_all_tm_blocks() from another pass that may be already
|
||||
using bb->aux. */
|
||||
bb_regions.safe_grow_cleared (last_basic_block_for_fn (cfun));
|
||||
|
||||
all_tm_regions = region;
|
||||
bb = single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun));
|
||||
queue.safe_push (bb);
|
||||
bitmap_set_bit (visited_blocks, bb->index);
|
||||
bb_regions[bb->index] = region;
|
||||
|
||||
do
|
||||
{
|
||||
bb = queue.pop ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user