>Seongbae Park wrote: > >Of course, it's best if this can be implemented in the compiler, >but if the size and the number of the readonly data is manageable, >you can do this by hand - >inspect what the layout of the class is by writing a test program >and looking at how the fields are layed out, >and replicating the same data in the assembly.
IMO, that would not really be a solution. Meanwhile, I have reduced a test case for the issue. It's 6 lines long. #include <complex> using namespace std; const complex<double> should_be_in_rodata (42,-42); complex<double> should_be_in_data (-42,42); complex<double> should_be_in_bss; Presently all of them end up in bss. Bjoern.