Commit 88f7d6fb by Fritz Reese Committed by Tobias Burnus

[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
parent 64e04187
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> 2014-09-02 Marek Polacek <polacek@redhat.com>
PR fortran/62270 PR fortran/62270
......
...@@ -1904,8 +1904,9 @@ variable_decl (int elem) ...@@ -1904,8 +1904,9 @@ variable_decl (int elem)
} }
/* If this symbol has already shown up in a Cray Pointer declaration, /* 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. */ 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); gfc_find_symbol (name, gfc_current_ns, 1, &sym);
if (sym != NULL && sym->attr.cray_pointee) if (sym != NULL && sym->attr.cray_pointee)
......
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> 2014-09-03 Martin Jambor <mjambor@suse.cz>
PR ipa/62015 PR ipa/62015
......
! { 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment