------- Comment #6 from Martin dot vGagern at gmx dot net 2006-09-22 07:14 ------- Comparing this issue here with bug 28686 I noticed that the code of the functions before the one containing both assembly blocks is completely irrelevant. So even if you only have one empty function in the DO_SINGLE block, enabling that part still makes things compile whereas disabling it causes the described error.
So there probably is no interaction between assembly statements in different functions. However inline assembly compiles differently if there is another function preceding the one with the assembly code. An empty function following the one with the asm statement does not have this effect. And there is still some interference between the two asm statements in function both(), as this function containing both of them fails while in the original test case, the function f1() containing only the one where the error is reported, again without preceding function, compiles cleanly. So two asm statements in one function still do interact in some nonintuitive way. (In reply to comment #5) > IMHO you should have at least 7 registers available. Some of this is discussed in bug 11807. I'd agree it would be nice to have all registers. But I'd not want this problem report here turn into yet another discussion of which registers should be usable by asm and which not. I'd rather stick to the point, that allocating a given number of registers sometimes works and sometimes does not, for exactly the same asm statement and even the same optimization flags, depending on bizarre outer circumstances like a preceding function or a following second asm statement. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28635