https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63472

--- Comment #6 from torvald at gcc dot gnu.org ---
(In reply to ak from comment #4)
> copy_bbs:
> 
> (illegal code due to goto into transaction?)
> 
> g_56[];
> fn1() {
>   int *p_79;
>   if (g_56[7])
>     __transaction_atomic {
>     lbl_196:
>       *p_79 = 1;
>     }
>   else
>     goto lbl_196;
> }

Yes, the goto into the transaction is illegal code.

> copy_loops:
> 
> func_65() {
>   __transaction_atomic {
>     for (;;)
>       func_65();
>   }
> }

I think that technically, at least for C++, this is illegal code because you
have an infinite loop with no side effects (atomics, volatile, IO) in it.  Does
this also fail when you make the recursion stop eventually?

Reply via email to