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

2015-06-09 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33661

--- Comment #13 from Andreas Krebbel krebbel at gcc dot gnu.org ---
Created attachment 35723
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35723action=edit
Experimental fix

The attached patch fixes the problem for me.

There appear to be two problems:

1. When parsing a template function cp_finish_decl returns before the asmspec
is set in a var decl.
2. When expanding the template function the assembler_name is zeroed out.


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

2015-06-03 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33661

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

 CC||krebbel at gcc dot gnu.org

--- Comment #12 from Andrew Pinski pinskia at gcc dot gnu.org ---
*** Bug 66393 has been marked as a duplicate of this bug. ***


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

2014-10-26 Thread adam at os dot inf.tu-dresden.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33661

--- Comment #11 from Adam Lackorzynski adam at os dot inf.tu-dresden.de ---
Confirming issue still exists for 4.7.4, 4.8.4, 4.9.2 and 5.0 (tested on
x86_64).


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

2012-05-31 Thread Aleksandrs.Saveljevs at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33661

--- Comment #10 from Aleksandrs Saveljevs Aleksandrs.Saveljevs at gmail dot 
com 2012-05-31 08:16:41 UTC ---
Confirming that the bug still exists on ARM, x86 and x86_64 as of GCC 4.6.3.


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

2011-08-24 Thread s.schuh85 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33661

Stefan Schuh s.schuh85 at gmail dot com changed:

   What|Removed |Added

 CC||s.schuh85 at gmail dot com

--- Comment #9 from Stefan Schuh s.schuh85 at gmail dot com 2011-08-24 
10:00:48 UTC ---
I can confirm this bug in gcc version 4.5.2 on i686-linux-gnu 
and in gcc version 4.6.0 on s390x-ibm-linux-gnu


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

2008-04-30 Thread adam at os dot inf dot tu-dresden dot de


--- Comment #6 from adam at os dot inf dot tu-dresden dot de  2008-04-30 
13:34 ---
Even if this is not a regression it would be very helpful if g++ would emit a
warning that the register allocation will be ignored. Those bugs are subtle.


-- 


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



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

2008-04-30 Thread vincent dot riviere at freesbee dot fr


--- Comment #7 from vincent dot riviere at freesbee dot fr  2008-04-30 
15:32 ---
This is not a regression, however it is a bug, it has to be fixed. Inline
assembly coupled with templates is very powerful, however because of this bug
it is unusable :-(
If I remember well, a workaround is to put the assembly in an inline global
function, then call it from the template method.


-- 


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



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

2008-04-30 Thread adam at os dot inf dot tu-dresden dot de


--- Comment #8 from adam at os dot inf dot tu-dresden dot de  2008-04-30 
20:22 ---
(In reply to comment #7)
 This is not a regression, however it is a bug, it has to be fixed. Inline
 assembly coupled with templates is very powerful, however because of this bug
 it is unusable :-(

I fully agree. I don't know how hard this one is to fix so at least a
warning/error would be good to have. Silently ignoring the allocation just
causes bugs nobody wants to have.


-- 


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



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

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #5 from pinskia at gcc dot gnu dot org  2008-04-29 17:09 ---
*** Bug 36080 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||adam at os dot inf dot tu-
   ||dresden dot de


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



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

2008-02-05 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2008-02-05 10:28 ---
This works for me on x86_64 with 4.3.0.


-- 


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



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

2008-02-05 Thread vincent dot riviere at freesbee dot fr


--- Comment #4 from vincent dot riviere at freesbee dot fr  2008-02-05 
19:56 ---
Same problem with GCC 4.3-20080201 on target i686-pc-linux-gnu


-- 


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



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

2008-02-02 Thread vincent dot riviere at freesbee dot fr


--- Comment #2 from vincent dot riviere at freesbee dot fr  2008-02-02 
20:48 ---
Still fails in GCC release 4.2.3


-- 

vincent dot riviere at freesbee dot fr changed:

   What|Removed |Added

  Known to fail|3.3.3 4.1.0 4.3.0   |3.3.3 4.1.0 4.2.3 4.3.0


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



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

2007-12-09 Thread pinskia 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:
templateclass 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 = Tplchar::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|-00-00 00:00:00 |2007-12-10 01:55:24
   date||


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