public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug fortran/20779] New: ALLOCATEing the STAT variable not detected @ 2005-04-05 23:10 tobi at gcc dot gnu dot org 2005-04-05 23:11 ` [Bug fortran/20779] " tobi at gcc dot gnu dot org 2005-04-05 23:35 ` pinskia at gcc dot gnu dot org 0 siblings, 2 replies; 7+ messages in thread From: tobi at gcc dot gnu dot org @ 2005-04-05 23:10 UTC (permalink / raw) To: gcc-bugs program fc011 ! Submitted by Walt Brainerd, The Fortran Company ! GNU Fortran 95 (GCC 4.1.0 20050322 (experimental)) ! Windows XP ! This program violates the following rule, identified below. integer, pointer :: PTR ! stat-variable must not be allocated within the ALLOCATE statement in ! which it appears -- this in general cannot be checked at compile-time ! but in this case it can be. allocate (PTR, stat=PTR) print *, 'This program has one error', PTR end program fc011 -- Summary: ALLOCATEing the STAT variable not detected Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: diagnostic Severity: enhancement Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tobi at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20779 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20779] ALLOCATEing the STAT variable not detected 2005-04-05 23:10 [Bug fortran/20779] New: ALLOCATEing the STAT variable not detected tobi at gcc dot gnu dot org @ 2005-04-05 23:11 ` tobi at gcc dot gnu dot org 2005-04-05 23:35 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 7+ messages in thread From: tobi at gcc dot gnu dot org @ 2005-04-05 23:11 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From tobi at gcc dot gnu dot org 2005-04-05 23:11 ------- Same problem, more ocmplicated testcase: program fc012 ! Submitted by Walt Brainerd, The Fortran Company ! Windows XP ! Reading specs from /usr/local/bin/../lib/gcc-lib/i686-pc-cygwin/4.0.0//specs ! Configured with: /gcc/configure --enable-languages=c ! Thread model: single ! gcc version 4.0.0 20050129 (experimental) (g95!) Feb 22 2005 ! This program violates the following rule, identified below. integer, allocatable :: ALLOCS(:) ! The stat-variable must not be allocated within the same statement. ! This is not a constraint as in general it cannot be detected at ! compile-time (for example, the stat variable can be a subscripted variable ! whose subscript is determined at run time). allocate (ALLOCS(10),stat=ALLOCS(1)) deallocate (ALLOCS) print *, 'This program has one error' end program fc012 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20779 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20779] ALLOCATEing the STAT variable not detected 2005-04-05 23:10 [Bug fortran/20779] New: ALLOCATEing the STAT variable not detected tobi at gcc dot gnu dot org 2005-04-05 23:11 ` [Bug fortran/20779] " tobi at gcc dot gnu dot org @ 2005-04-05 23:35 ` pinskia at gcc dot gnu dot org 1 sibling, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-04-05 23:35 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-05 23:35 ------- Confirmed. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2005-04-05 23:35:02 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20779 ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <bug-20779-8513@http.gcc.gnu.org/bugzilla/>]
* [Bug fortran/20779] ALLOCATEing the STAT variable not detected [not found] <bug-20779-8513@http.gcc.gnu.org/bugzilla/> @ 2006-09-05 19:39 ` pault at gcc dot gnu dot org 2006-09-17 17:40 ` patchapp at dberlin dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: pault at gcc dot gnu dot org @ 2006-09-05 19:39 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from pault at gcc dot gnu dot org 2006-09-05 19:39 ------- A patch is ready but I have not had time to post it. Watch the list this weekend. 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|2005-12-31 20:17:24 |2006-09-05 19:39:37 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20779 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20779] ALLOCATEing the STAT variable not detected [not found] <bug-20779-8513@http.gcc.gnu.org/bugzilla/> 2006-09-05 19:39 ` pault at gcc dot gnu dot org @ 2006-09-17 17:40 ` patchapp at dberlin dot org 2006-10-03 21:40 ` pault at gcc dot gnu dot org 2006-10-03 21:41 ` pault at gcc dot gnu dot org 3 siblings, 0 replies; 7+ messages in thread From: patchapp at dberlin dot org @ 2006-09-17 17:40 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from patchapp at dberlin dot org 2006-09-17 17:40 ------- Subject: Bug number PR20779 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00680.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20779 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20779] ALLOCATEing the STAT variable not detected [not found] <bug-20779-8513@http.gcc.gnu.org/bugzilla/> 2006-09-05 19:39 ` pault at gcc dot gnu dot org 2006-09-17 17:40 ` patchapp at dberlin dot org @ 2006-10-03 21:40 ` pault at gcc dot gnu dot org 2006-10-03 21:41 ` pault at gcc dot gnu dot org 3 siblings, 0 replies; 7+ messages in thread From: pault at gcc dot gnu dot org @ 2006-10-03 21:40 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from pault at gcc dot gnu dot org 2006-10-03 21:40 ------- Subject: Bug 20779 Author: pault Date: Tue Oct 3 21:40:24 2006 New Revision: 117415 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117415 Log: 2006-10-03 Paul Thomas <pault@gcc.gnu.org> PR fortran/20779 PR fortran/20891 * resolve.c (find_sym_in_expr): New function that returns true if a symbol is found in an expression. (resolve_allocate_expr): Check whether the STAT variable is itself allocated in the same statement. Use the call above to check whether any of the allocated arrays are used in array specifications in the same statement. 2006-10-03 Paul Thomas <pault@gcc.gnu.org> PR fortran/20779 PR fortran/20891 * gfortran.dg/alloc_alloc_expr_1.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/alloc_alloc_expr_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20779 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/20779] ALLOCATEing the STAT variable not detected [not found] <bug-20779-8513@http.gcc.gnu.org/bugzilla/> ` (2 preceding siblings ...) 2006-10-03 21:40 ` pault at gcc dot gnu dot org @ 2006-10-03 21:41 ` pault at gcc dot gnu dot org 3 siblings, 0 replies; 7+ messages in thread From: pault at gcc dot gnu dot org @ 2006-10-03 21:41 UTC (permalink / raw) To: gcc-bugs ------- Comment #6 from pault at gcc dot gnu dot org 2006-10-03 21:41 ------- Fixed on trunk 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=20779 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-10-03 21:41 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-04-05 23:10 [Bug fortran/20779] New: ALLOCATEing the STAT variable not detected tobi at gcc dot gnu dot org 2005-04-05 23:11 ` [Bug fortran/20779] " tobi at gcc dot gnu dot org 2005-04-05 23:35 ` pinskia at gcc dot gnu dot org [not found] <bug-20779-8513@http.gcc.gnu.org/bugzilla/> 2006-09-05 19:39 ` pault at gcc dot gnu dot org 2006-09-17 17:40 ` patchapp at dberlin dot org 2006-10-03 21:40 ` pault at gcc dot gnu dot org 2006-10-03 21:41 ` 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).