[Patch, Fortran] PR 45044 - Named common: Different size diagnostics

Tobias Burnus burnus@net-b.de
Tue Aug 30 21:31:00 GMT 2011


Named common blocks are required to have the same size in all files and 
scopes. gfortran was warning before when the size was extended, but not 
when a smaller common block followed a larger common block with the same 
name.

This patch adds now a non-equal check and also mentions the byte size. I 
was thinking of adding another ref to point to the first common block, 
but my approach did not work (cf. PR comment 4) - besides, I find error 
messages with two loci harder to read.

Build and regtested on x86-64-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: common-size-warn.diff
Type: text/x-patch
Size: 2493 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110830/6a105ae1/attachment.bin>


More information about the Fortran mailing list