[Fortran,Patch,committed] PR 41034 [4.5 Regression] Wrongly rejected proc pointer assignment with CDECL (compiler-directive_1.f90)
Tobias Burnus
burnus@net-b.de
Wed Aug 12 09:05:00 GMT 2009
Hi all,
I committed attached patch as obvious.
There were two problems:
a) In the pointer assign check, I did not initialize the local ext_attr,
i.e. using DLLEXPORT for one variable but not for the other could
show an error message, even though it shouldn't.
b) In gfc_copy_attr: I simply overwrote the "dest" by "src". However,
the logic of gfc_copy_attr seems to be that it merges the flages,
i.e. attr.pointer is added if "src" is "attr.pointer" but it is
not cleared in "dest" if it isn't. Now I simply add the bits.
The failure was for
!GCC$ ATTRIBUTES STDCALL :: ptr
procedure(), pointer :: ptr
If one reverts the order, it worked.
Build and regtested (check-fortran, check libgomp) on x86-64-linux
(64 bit mode). And committed as:
Sending fortran/ChangeLog
Sending fortran/expr.c
Sending fortran/symbol.c
Transmitting file data ...
Committed revision 150678.
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stdcall-fix2.diff
Type: text/x-patch
Size: 2414 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090812/a049d5b9/attachment.bin>
More information about the Gcc-patches
mailing list