https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91043

--- Comment #22 from Hanoch Haim <hhaim at cisco dot com> ---

"Of course it does, because without aligning the container you cannot have
aligned members.  Maximum alignment always propagates outwards."

Sorry, your answer is still not  clear, so let give a short example
In this case there is a discrepancy betwean two gcc modules  

1. The module that generates the code think that it is aligned (CCPortLatency)
2. However the linker puts it in a none aligned location  


"
class CTimeHistogram {

} __rte_cache_aligned;

class CCPortLatency {
public:
     CTimeHistogram  m_hist;  
}; 
class Root {

        CCPortLatency port;

} __rte_cache_aligned;

static Root root; 
"

In this case can I expect root.port to be aligned because its child (m_hist)
was defined as aligned and it propogate? Or should I explicitly ask both to be
aligned?

Reply via email to