[Bug c++/28271] Specialization of a function is not called if compile with -03 option

2006-07-05 Thread maxime dot fiandino at imag dot fr
--- Comment #1 from maxime dot fiandino at imag dot fr 2006-07-05 13:11 --- Created an attachment (id=11829) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11829action=view) The main, just call the template function foo and return the return value --

[Bug c++/28271] Specialization of a function is not called if compile with -03 option

2006-07-05 Thread maxime dot fiandino at imag dot fr
--- Comment #2 from maxime dot fiandino at imag dot fr 2006-07-05 13:12 --- Created an attachment (id=11830) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11830action=view) the specialization The specialization on int return true --

[Bug c++/28271] Specialization of a function is not called if compile with -03 option

2006-07-05 Thread maxime dot fiandino at imag dot fr
--- Comment #3 from maxime dot fiandino at imag dot fr 2006-07-05 13:12 --- Created an attachment (id=11831) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11831action=view) The header with the generic implementation The generic template function return false --

[Bug c++/28271] Specialization of a function is not called if compile with -03 option

2006-07-05 Thread maxime dot fiandino at imag dot fr
--- Comment #4 from maxime dot fiandino at imag dot fr 2006-07-05 13:14 --- Created an attachment (id=11832) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11832action=view) The makefile to test This makefile create two executable TC1 compiled with -02 which work well TC2

[Bug c++/28271] Specialization of a function is not called if compile with -03 option

2006-07-05 Thread maxime dot fiandino at imag dot fr
--- Comment #5 from maxime dot fiandino at imag dot fr 2006-07-05 13:18 --- This bug was firstly discover under gcc3.2.3, then we test with 4.1.1 with the same results. The test case is very short. -- maxime dot fiandino at imag dot fr changed: What|Removed

[Bug c++/28271] Specialization of a function is not called if compile with -03 option

2006-07-05 Thread rguenth at gcc dot gnu dot org
--- Comment #6 from rguenth at gcc dot gnu dot org 2006-07-05 14:04 --- You need to make the specialization visible at the point of instantiation. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/28271] Specialization of a function is not called if compile with -03 option

2006-07-05 Thread maxime dot fiandino at imag dot fr
--- Comment #7 from maxime dot fiandino at imag dot fr 2006-07-05 14:33 --- Thanks, for you quick answer Richard. Where i don't understand is, it is working well if i declare the generic template function with: templatetypename T bool foo(T val) __attribute__(noinline) { return