[Fortran,Patch] PR40955 - Save ext_attr such as STDCALL to .MOD file

Tobias Burnus burnus@net-b.de
Tue Aug 4 08:23:00 GMT 2009


Another STDCALL (and friends) omission: The extended attribute was not
saved in the MOD file.

The patch does this. I could not use the mechanism used for the other
items in mio_symbol_attribute as it is neither a simple 0/1 bit flag
nor an ENUM but an integer flag where the values are bitwise ORed.

I could have bumped the MOD file version; however, as it already was
bumped for 4.5 and as the message is somewhat clear
("Fatal Error: Reading module ... Expected attribute bit name" ...
and "... Expected integer"), I have not done it.

I have bootstrapped and regtested (check gfortran & libgomp) it on
x86-64-linux, but I cannot really test it - except that for a simple
test case, there is now an additional
 test.f90:10:0: warning: 'stdcall' attribute ignored
for the CALL, i.e. it seems to work correctly.
I do not know how to best create a test case, thus I have not added
one. I think we badly need a test case for 32bit MinGW/Cygwin, which
calls some STDCALL Windows ABI function.
 
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stdcall-mod.diff
Type: text/x-patch
Size: 853 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090804/09b96be7/attachment.bin>


More information about the Gcc-patches mailing list