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]

asm and templates



	Hi,

I think I have found another strange behaviour in egcs. My configuration is:
i586-pc-linux-gnulibc1 with "gcc version egcs-2.90.19 971127"
but the bug exists also with egcs 971122 and should be target independent.

Here is a sample example:

--------------------------------- test2.ii ---------------------------------
# 1 "test2.C"
template <const unsigned c>
void f() {
	asm("foo");
}

int
main()
{
	f<1>();           
}
---------------------------------------------------------------------------

(egcs++ is a symbolic link to the egcs g++ version)
hawai->egcs++ -S test2.ii

This produce a test2.s file that does not contain any string foo. It seems that
asm are silently not emitted when in templates.

	Thank's a lot, egcs is a very nice piece of work.

	Theo.


 --------------------------------------------------------------------
 Theodore Papadopoulo
 Email:  papadop@sophia.inria.fr               Tel: (33) 93 65 76 01
 --------------------------------------------------------------------



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