public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43745]  New: g++ puts VTABLES in SRAM
@ 2010-04-13  8:15 tfrancuz at mp dot pl
  2010-04-14 19:53 ` [Bug target/43745] [avr] " eric dot weddington at atmel dot com
  2010-04-14 20:40 ` tfrancuz at mp dot pl
  0 siblings, 2 replies; 11+ messages in thread
From: tfrancuz at mp dot pl @ 2010-04-13  8:15 UTC (permalink / raw)
  To: gcc-bugs

On AVR target g++ generates code which copies object’s VTABLES from FLASH
to SRAM wasting the memory. Due to the Harvard architecture of AVR processors
the solution is not trivial. This behavior can be observed in any c++ program
which has object with virtual method, e.g:
Class test
{
        virtual void example();
};

The VTABLE of class test will be generated in FLASH and next copied to SRAM,
any reference to virtual example() method will take the method address from
SRAM.


-- 
           Summary: g++ puts VTABLES in SRAM
           Product: gcc
           Version: 4.3.5
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tfrancuz at mp dot pl


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-05 23:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-43745-4@http.gcc.gnu.org/bugzilla/>
2011-02-06 19:38 ` [Bug target/43745] [avr] g++ puts VTABLES in SRAM Kicer86 at gmail dot com
2011-11-21 16:18 ` gjl at gcc dot gnu.org
2011-11-24 22:14 ` tfrancuz at mp dot pl
2012-01-07 12:21 ` gjl at gcc dot gnu.org
2012-11-29 11:58 ` RiccardoManfrin at email dot it
2013-04-26 11:54 ` d.come at isae dot fr
2013-06-11 13:17 ` [Bug c++/43745] " gjl at gcc dot gnu.org
2014-02-16 13:17 ` jackie.rosen at hushmail dot com
2021-11-05 23:18 ` timturnerc at yahoo dot com
2010-04-13  8:15 [Bug c++/43745] New: " tfrancuz at mp dot pl
2010-04-14 19:53 ` [Bug target/43745] [avr] " eric dot weddington at atmel dot com
2010-04-14 20:40 ` tfrancuz at mp dot pl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).