This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to enable unlimited polymorphism to gfortran
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Tobias Burnus <burnus at net-b dot de>
- Date: Wed, 19 Dec 2012 07:17:41 +0100
- Subject: Re: Patch to enable unlimited polymorphism to gfortran
- References: <20121218231842.8657D3BC70@mailhost.lps.ens.fr>
Thanks Tobias and Dominique,
I'll make the corrections that you have requested. I believe that the
2*(GFC_MAX_SYMBOL_LEN+1) has a historic origin - I had not thought
about it until last night, when you pointed it out.
As for the segfault - that line should go. The automatic nulling of
the _vptr of 'u1', on scope entry, has gone and so its value is
indeterminate. same_type_as takes the _vptrs as arguments - hence the
segfault.
I'll commit tonight unless anybody has any objections.
Cheers
Paul
On 19 December 2012 00:18, Dominique Dhumieres <dominiq@lps.ens.fr> wrote:
> Dear Paul,
>
> With your patch applied on top of a clean revision 194590, the executable
> for unlimited_polymorphic_1.f03 gives a Segmentation fault -
> invalid memory reference at
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000100001d1c in MAIN__ () at /opt/gcc/p_work/gcc/testsuite/gfortran.dg/unlimited_polymorphic_1.f03:69
> 69 if (SAME_TYPE_AS (obj1, u1) .neqv. .FALSE.) call abort
>
> This segmentation fault disappears if I compile the test with
> -fsanitize=address, while valgrind gives an endless
>
> ==14264== Signal 11 being dropped from thread 0's queue
>
> Indeed this is on x86_64-apple-darwin10.
>
> TIA
>
> Dominique
>
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy