This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to enable unlimited polymorphism to gfortran


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]