This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

const global objects fail to initialise properly with arm-elf-gcc 3.2.1 (and code is ~200k bigger!)


Hi,

I have encountered an interesting problem with arm-elf-gcc 3.2.1 that does not exist in 2.95.3

I found some code in our application as that follows this form ...

namespace SomeClassDefs
{

const unsigned int SOME_CLASS_NUMBER = 255;
    
const SomeClass GLOBAL_SOME_CLASSES[SOME_CLASS_NUMBER] =
{
  SomeClass("This is an initialisation string! 0x00"),
  SomeClass("This is an initialisation string! 0x01"),
  SomeClass("This is an initialisation string! 0x02"),
  SomeClass("This is an initialisation string! 0x03"),
  SomeClass("This is an initialisation string! 0x04"),
  SomeClass("This is an initialisation string! 0x05"),
  SomeClass("This is an initialisation string! 0x06"),
  SomeClass("This is an initialisation string! 0x07"),
  ... etc
};

}

The SomeClass implements an isOK() method and it is used as follows ...

assert(GLOBAL_SOME_CLASSES[n].isOK() == true);

When it is compiled with the old compiler the assert passes.
When it is compiled with the new compiler the assert fails.

Has anyone experienced something similar?
We are pushed for time at the moment so we have rolled back to the old compiler.

(BTW The unoptimised code size for the new compiler is ~200k bigger!!! Does any one know why?)

regards
Luke Hoffmann



____
This communication contains information which is confidential and the copyright of Nautronix. 

If you are not the intended recipient of this communication please delete and destroy all copies and advise Nautronix immediately. If you are the intended recipient of this communication you should not copy, disclose or distribute this communication without the prior authority of Nautronix. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of Nautronix.

Except as required at law, Nautronix does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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