This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

C++ inlne asm bug


In C++ when using inline asm with clobbers string concatenation does
not work for the clobber part.  E.g. on Intel the following compiles
as a C program, but fails to compile as C++:

void
voo(void)
{
    __asm__ __volatile__("" : : : "di" "");
}

I know it is meaningless, the original asm I was using which faild was
on rs6k PowerPC:

#define LFD(X,Y) __asm__ __volatile__("lfd " #X ",0(%0)" : : "r"(Y) : "fr" #X)

void
foo(double *p)
{
    LFD(14,p);
}

Again, this works in C but not in C++.

This bug is present in gcc-2.95 as well as in the April 18 snapshot.

Zoli

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