------- Additional Comments From schlie at comcast dot net  2005-02-28 04:40 
-------
> oh, this is still a target bug.

Possibly (but likely of similar concern for other small embedded targets)

The problem is that the initialization data which is linked in .data (stored in 
readable flash/rom)
is first copied to RAM, prior to then being copied to the data structure which 
may require
initialization. (resulting in a needless redundant copy chewing up precious 
RAM).

As in for example:

struct s{
  long a;
  long b;
  long c;
  long d;
};

void main (void){
  volatile struct s x = {0, 1, 2, 3};
  volatile struct s y = {0, 1, 2, 3};
  /* etc. */
}



-- 


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

Reply via email to