This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: [PATCH,fortran]: fix bind(c) common block alignment


On Mon, Aug 06, 2007 at 11:17:01AM -0600, Christopher D. Rickett wrote:
> hi Tobias,
> 
> currently, the patch only changes the alignment if the common block is 
> bind(c), which means the compiler should have already verified that the 
> common block fields interop with C.
> 
> as to why we weren't seeing it before, i do not know.  the 
> bind_c_coms.f90/bind_c_coms_driver.c illustrates on x86 linux that there 
> is a difference in the alignment.  the generated assembly shows it, but 
> the linker didn't complain.
> 

The Linux linker can handle different alignments on the same common
symbol without problems. Linker will complain only if a definition of
a smaller alignment overrides a common symbol with a bigger alignment.
We have linker testcases to verify those. 


H.J.


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