[multiple changes]

2014-09-03  Fritz Reese  <Reese-Fritz@zai.com>

        PR fortran/62174
        * decl.c (variable_decl): Don't overwrite typespecs of Cray
        * pointees
        when matching a component declaration.

2014-09-02  Fritz Reese  <Reese-Fritz@zai.com>

        PR fortran/62174
        * gfortran.dg/cray_pointers_11.f90: New.

From-SVN: r214891
This commit is contained in:
Fritz Reese 2014-09-03 18:50:27 +00:00 committed by Tobias Burnus
parent 64e04187a1
commit 88f7d6fb23
4 changed files with 35 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2014-09-03 Fritz Reese <Reese-Fritz@zai.com>
PR fortran/62174
* decl.c (variable_decl): Don't overwrite typespecs of Cray pointees
when matching a component declaration.
2014-09-02 Marek Polacek <polacek@redhat.com>
PR fortran/62270

View file

@ -1904,8 +1904,9 @@ variable_decl (int elem)
}
/* If this symbol has already shown up in a Cray Pointer declaration,
and this is not a component declaration,
then we want to set the type & bail out. */
if (gfc_option.flag_cray_pointer)
if (gfc_option.flag_cray_pointer && gfc_current_state () != COMP_DERIVED)
{
gfc_find_symbol (name, gfc_current_ns, 1, &sym);
if (sym != NULL && sym->attr.cray_pointee)

View file

@ -1,3 +1,8 @@
2014-09-02 Fritz Reese <Reese-Fritz@zai.com>
PR fortran/62174
* gfortran.dg/cray_pointers_11.f90: New.
2014-09-03 Martin Jambor <mjambor@suse.cz>
PR ipa/62015

View file

@ -0,0 +1,22 @@
! { dg-do compile }
! { dg-options "-fcray-pointer" }
!
! PR fortran/62174
! Component declarations within derived types would overwrite the typespec of
! variables with the same name who were Cray pointees.
implicit none
type t1
integer i
end type t1
type(t1) x
pointer (x_ptr, x)
type t2
real x ! should not overwrite x's type
end type t2
x%i = 0 ! should see no error here
end