Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 931658 Details for
Bug 1134560
Component declarations overwrite types of Cray Pointee variables
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch and testcase
cpns.patch (text/plain), 1.26 KB, created by
Fritz Reese
on 2014-08-27 19:13:52 UTC
(
hide
)
Description:
Patch and testcase
Filename:
MIME Type:
Creator:
Fritz Reese
Created:
2014-08-27 19:13:52 UTC
Size:
1.26 KB
patch
obsolete
> >diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c >index 4048ac9..7b3c59a 100644 >--- a/gcc/fortran/decl.c >+++ b/gcc/fortran/decl.c >@@ -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) >diff --git a/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 b/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 >new file mode 100644 >index 0000000..fcc0132 >--- /dev/null >+++ b/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 >@@ -0,0 +1,22 @@ >+! { dg-do compile } >+! { dg-options "-fcray-pointer" } >+! >+! Since the introduction of Cray pointers in 4.1.0 as late as 4.8.3, >+! 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1134560
: 931658