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]
Other format: [Raw text]

[Bug c++/33661] template methods forget explicit local reg vars



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-12-10 01:55 -------
Confirmed,
It also fails with 3.3 so this is not a regression.
A testcase for PPC:
template<class T>
class Tpl
{
public:
        static long* MySysCall()
        {
                register long retval __asm__("r3");

                asm
                (
                        "trap   #0\n\t"
                        "move.l %0,%0\n\t"
                : "=r"(retval)
                :
                : "r4"
                );

                return (long*)retval;
        }
};

void f()
{
        long* p = Tpl<char>::MySysCall();
        *p = 1;
}

Note I did not change the inline-asm's string though so it will not assemble.




-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
      Known to fail|                            |3.3.3 4.1.0 4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2007-12-10 01:55:24
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33661


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