[Patch, Fortran] PR55852 fix ubound /size ICE and cleanup class.c's finalizer
Tobias Burnus
burnus@net-b.de
Mon Jan 7 09:13:00 GMT 2013
Dear all,
the following patch is based on Thomas' comment 5 in PR55852. He
independently created a patch for the PR; his version is in comment 6:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55852#c6
The problem with the current trunk's version of gfc_build_intrinsic_call
is that it assumes that gfc_find_symtree will return the intrinsic
function ("size" in this case); if the user has a different symbol named
"size" or hasn't used "size", the code doesn't work.
My version is attached.
In my version, the gfc_build_intrinsic_call takes "gfc_isym_id" as
identifier for the intrinsic - the passed string is mangled via
GFC_PREFIX to avoid issues with symbol declarations of the user.
I do set rather bluntly "n.sym... = ", assuming that under mangled name
one always finds this intrinsic function.
Besides fixing the ICE, I used the opportunity to cleanup class.c, where
I now use gfc_build_intrinsic_call, which is a nice cleanup: 4 files
changed, 65 insertions(+), 143 deletions(-)
Build and regtested on x86-64-gnu-linux.
OK for the trunk?
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_intrinsic_call.diff
Type: text/x-patch
Size: 16816 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20130107/4f571d30/attachment.bin>
More information about the Fortran
mailing list