public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug fortran/38917] New: Can't use DATA to initialize pointer to array to NULL() @ 2009-01-19 22:03 dick dot hendrickson at gmail dot com 2009-01-20 7:25 ` [Bug fortran/38917] " burnus at gcc dot gnu dot org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: dick dot hendrickson at gmail dot com @ 2009-01-19 22:03 UTC (permalink / raw) To: gcc-bugs The following program gives error messages for using DATA to iniialize pointers to arrays to NULL() Dick Hendrickson SUBROUTINE PF0005 ! fails on Windows XP ! gcc version 4.4.0 20081219 (experimental) [trunk revision 142842] (GCC) REAL, SAVE, POINTER :: PTR1 INTEGER, POINTER :: PTR2(:,:,:) CHARACTER(LEN=1), SAVE, POINTER :: PTR3(:) DATA PTR1 / NULL() / DATA PTR2 / NULL() / DATA PTR3 / NULL() / end subroutine pf0005 C:\documents and settings\s and h\my documents\g_experiments\gfortran>gfortran t ry_pf0005.f try_pf0005.f:12.10: DATA PTR3 / NULL() / 1 Error: Nonconstant array section at (1) in DATA statement try_pf0005.f:11.10: DATA PTR2 / NULL() / 1 Error: Nonconstant array section at (1) in DATA statement -- Summary: Can't use DATA to initialize pointer to array to NULL() Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dick dot hendrickson at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38917 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/38917] Can't use DATA to initialize pointer to array to NULL() 2009-01-19 22:03 [Bug fortran/38917] New: Can't use DATA to initialize pointer to array to NULL() dick dot hendrickson at gmail dot com @ 2009-01-20 7:25 ` burnus at gcc dot gnu dot org 2009-01-22 20:17 ` pault at gcc dot gnu dot org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: burnus at gcc dot gnu dot org @ 2009-01-20 7:25 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from burnus at gcc dot gnu dot org 2009-01-20 07:25 ------- Confirm. Thanks for the report. R532 data-stmt-constant is ... or null-init R507 null-init is function-reference C506 (R507) The function-reference shall be a reference to the NULL intrinsic function with no arguments Probably a duplicate of PR 38918. -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |32834 nThis| | Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |rejects-valid Last reconfirmed|0000-00-00 00:00:00 |2009-01-20 07:25:22 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38917 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/38917] Can't use DATA to initialize pointer to array to NULL() 2009-01-19 22:03 [Bug fortran/38917] New: Can't use DATA to initialize pointer to array to NULL() dick dot hendrickson at gmail dot com 2009-01-20 7:25 ` [Bug fortran/38917] " burnus at gcc dot gnu dot org @ 2009-01-22 20:17 ` pault at gcc dot gnu dot org 2009-01-24 12:54 ` [Bug fortran/38917] [Fix pending] " pault at gcc dot gnu dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pault at gcc dot gnu dot org @ 2009-01-22 20:17 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from pault at gcc dot gnu dot org 2009-01-22 20:16 ------- I am just about to post a fix. Paul -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2009-01-20 07:25:22 |2009-01-22 20:16:51 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38917 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/38917] [Fix pending] Can't use DATA to initialize pointer to array to NULL() 2009-01-19 22:03 [Bug fortran/38917] New: Can't use DATA to initialize pointer to array to NULL() dick dot hendrickson at gmail dot com 2009-01-20 7:25 ` [Bug fortran/38917] " burnus at gcc dot gnu dot org 2009-01-22 20:17 ` pault at gcc dot gnu dot org @ 2009-01-24 12:54 ` pault at gcc dot gnu dot org 2009-03-31 20:06 ` [Bug fortran/38917] " pault at gcc dot gnu dot org 2009-04-06 10:54 ` pault at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pault at gcc dot gnu dot org @ 2009-01-24 12:54 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from pault at gcc dot gnu dot org 2009-01-24 12:54 ------- See PR38918 for fix -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Can't use DATA to initialize|[Fix pending] Can't use DATA |pointer to array to NULL() |to initialize pointer to | |array to NULL() http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38917 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/38917] Can't use DATA to initialize pointer to array to NULL() 2009-01-19 22:03 [Bug fortran/38917] New: Can't use DATA to initialize pointer to array to NULL() dick dot hendrickson at gmail dot com ` (2 preceding siblings ...) 2009-01-24 12:54 ` [Bug fortran/38917] [Fix pending] " pault at gcc dot gnu dot org @ 2009-03-31 20:06 ` pault at gcc dot gnu dot org 2009-04-06 10:54 ` pault at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pault at gcc dot gnu dot org @ 2009-03-31 20:06 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from pault at gcc dot gnu dot org 2009-03-31 20:06 ------- Subject: Bug 38917 Author: pault Date: Tue Mar 31 20:05:44 2009 New Revision: 145371 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145371 Log: 2009-03-31 Paul Thomas <pault@gcc.gnu.org> PR fortran/38917 * expr.c (gfc_check_assign): Allow pointer components when checking for NULL. PR fortran/38918 * resolve.c (check_data_variable): Treat pointer arrays with scalars. 2009-03-31 Paul Thomas <pault@gcc.gnu.org> PR fortran/38917 PR fortran/38918 * gfortran.dg/data_pointer_1.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/data_pointer_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/expr.c trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38917 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/38917] Can't use DATA to initialize pointer to array to NULL() 2009-01-19 22:03 [Bug fortran/38917] New: Can't use DATA to initialize pointer to array to NULL() dick dot hendrickson at gmail dot com ` (3 preceding siblings ...) 2009-03-31 20:06 ` [Bug fortran/38917] " pault at gcc dot gnu dot org @ 2009-04-06 10:54 ` pault at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pault at gcc dot gnu dot org @ 2009-04-06 10:54 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from pault at gcc dot gnu dot org 2009-04-06 10:54 ------- Fixed on trunk. I am prepared to backport but the mood appears to be against it. Thanks for the report. Paul -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38917 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-04-06 10:54 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-01-19 22:03 [Bug fortran/38917] New: Can't use DATA to initialize pointer to array to NULL() dick dot hendrickson at gmail dot com 2009-01-20 7:25 ` [Bug fortran/38917] " burnus at gcc dot gnu dot org 2009-01-22 20:17 ` pault at gcc dot gnu dot org 2009-01-24 12:54 ` [Bug fortran/38917] [Fix pending] " pault at gcc dot gnu dot org 2009-03-31 20:06 ` [Bug fortran/38917] " pault at gcc dot gnu dot org 2009-04-06 10:54 ` pault at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).