static void
note_eh_region_may_contain_throw (eh_region region)
{
- while (!bitmap_bit_p (eh_region_may_contain_throw_map, region->index))
+ while (bitmap_set_bit (eh_region_may_contain_throw_map, region->index))
{
- bitmap_set_bit (eh_region_may_contain_throw_map, region->index);
region = region->outer;
if (region == NULL)
break;
return true;
return false;
+ case COMPLEX_EXPR:
+ case CONSTRUCTOR:
+ /* Constructing an object cannot trap. */
+ return false;
+
default:
/* Any floating arithmetic may trap. */
if (fp_operation && flag_trapping_math)
switch (code)
{
case TARGET_MEM_REF:
- /* For TARGET_MEM_REFs use the information based on the original
- reference. */
- expr = TMR_ORIGINAL (expr);
- code = TREE_CODE (expr);
- goto restart;
+ if (TREE_CODE (TMR_BASE (expr)) == ADDR_EXPR
+ && !TMR_INDEX (expr) && !TMR_INDEX2 (expr))
+ return false;
+ return !TREE_THIS_NOTRAP (expr);
case COMPONENT_REF:
case REALPART_EXPR:
return false;
/* Fallthru. */
case INDIRECT_REF:
- case MISALIGNED_INDIRECT_REF:
return !TREE_THIS_NOTRAP (expr);
case ASM_EXPR:
/* If the block is totally empty, look for more unsplitting cases. */
if (gsi_end_p (gsi))
- return cleanup_empty_eh_unsplit (bb, e_out, lp);
+ {
+ /* For the degenerate case of an infinite loop bail out. */
+ if (e_out->dest == bb)
+ return false;
+
+ return cleanup_empty_eh_unsplit (bb, e_out, lp);
+ }
/* The block should consist only of a single RESX statement. */
resx = gsi_stmt (gsi);