This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, OOP] PR 57305: ICE when calling SIZEOF on an unlimited polymorphic variable
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: Janus Weil <janus at gcc dot gnu dot org>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 Aug 2013 11:40:08 +0200
- Subject: Re: [Patch, Fortran, OOP] PR 57305: ICE when calling SIZEOF on an unlimited polymorphic variable
- Authentication-results: sourceware.org; auth=none
- References: <CAKwh3qi633jU-ojPKqRa_16DKWhXn9L2N0Wr4trAG9p1dJ-sXg at mail dot gmail dot com> <521686C0 dot 2030100 at sfr dot fr> <CAKwh3qikJvKc1dn8bP4nXFVNy9c7yX0khR0szDLcDPsoJa9FUg at mail dot gmail dot com> <521B576A dot 8060502 at sfr dot fr> <CAKwh3qirVrgTuzH1Dd0O4n1YacrZ+zzKynsWe4wLoqz=_eZGXg at mail dot gmail dot com>
Le 26/08/2013 16:16, Janus Weil a écrit :
>>>> I'm slightly inclined to kindly invite the user to switch to
>>>> STORAGE_SIZE+SIZE instead. Any other opinion?
>>>
>>> Since the SIZEOF intrinsic has been around for some time in gfortran
>>> (before STORAGE_SIZE was available), I would say we should at least
>>> continue to support it for backward compatibility. And I guess we
>>> should also make it behave reasonably for all inputs. However, it
>>> might be worth to add a note in the documentation that STORAGE_SIZE
>>> and SIZE should be used instead in standard-conforming code.
>>>
>> I thought about it again, and what I'm actually in favor of is
>> diagnosing by default _all_ extensions having a standard replacement.
>
> By 'diagnosing' you mean to give a warning? This can already be
> accomplished by compiling with "-std=f2008 -Wintrinsics-std", I guess
> (not by default, though).
>
Yes, it would boil down to using that by default.
> Using only -std=f2008 currently results in errors like:
>
> undefined reference to `sizeof_'
>
... which is the best we can do, as sizeof could be a user
externally-defined function.
Mikael
- References:
- [Patch, Fortran, OOP] PR 57305: ICE when calling SIZEOF on an unlimited polymorphic variable
- Re: [Patch, Fortran, OOP] PR 57305: ICE when calling SIZEOF on an unlimited polymorphic variable
- Re: [Patch, Fortran, OOP] PR 57305: ICE when calling SIZEOF on an unlimited polymorphic variable
- Re: [Patch, Fortran, OOP] PR 57305: ICE when calling SIZEOF on an unlimited polymorphic variable
- Re: [Patch, Fortran, OOP] PR 57305: ICE when calling SIZEOF on an unlimited polymorphic variable