This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug c++/46269] [trans-mem] internal compiler error in expand_block_tm of trans-mem.c

On 11/10/2010 01:43 PM, Aldy Hernandez wrote:
>  	case GIMPLE_ASM:
> -	  gcc_unreachable ();
> +	  {
> +	    gimple g;
> +	    g = gimple_build_call (built_in_decls[BUILT_IN_TM_IRREVOCABLE], 0);
> +	    gimple_set_location (g, gimple_location (stmt));
> +	    gsi_insert_before (&gsi, g, GSI_SAME_STMT);
> +	    transaction_subcode_ior (region, GTMA_MAY_ENTER_IRREVOCABLE);
> +	    break;

The reason there's a gcc_unreachable there is that we're supposed to
have already handled this case.

See ipa_tm_scan_irr_block where we notice the asm, and ipa_tm_scan_irr_blocks
where we mark the block as irrevocable.  See ipa_tm_transform_calls_1 where
we insert the irrevocable call at the head of blocks so marked.

In pass execute_tm_mark, we're supposed to have stopped transforming the
region when the block is irrevocable.  Thus the /*stop_at_irr_p=*/true in
the call to get_tm_region_blocks.  Apparently, that isn't doing what it says,
so at a guess that's where the real bug lies.  Assuming, of course, that we
really did insert the irrevocable call during the ipa pass as we intended.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]