This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/63472] transaction_atomic within while loop causes ICE
- From: "torvald at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Jan 2015 19:49:09 +0000
- Subject: [Bug c++/63472] transaction_atomic within while loop causes ICE
- Auto-submitted: auto-generated
- References: <bug-63472-4 at http dot gcc dot gnu dot org/bugzilla/>
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?