[Bug c++/63472] transaction_atomic within while loop causes ICE

torvald at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 30 19:49:00 GMT 2015


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?



More information about the Gcc-bugs mailing list