This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33661] template methods forget explicit local reg vars
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Dec 2007 01:55:24 -0000
- Subject: [Bug c++/33661] template methods forget explicit local reg vars
- References: <bug-33661-14645@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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