public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/44529] [F03] array allocation with SOURCE
[not found] <bug-44529-4@http.gcc.gnu.org/bugzilla/>
@ 2011-02-06 12:19 ` tkoenig at gcc dot gnu.org
2012-02-17 9:42 ` burnus at gcc dot gnu.org
2013-07-25 12:17 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 6+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2011-02-06 12:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44529
--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-02-06 11:37:33 UTC ---
I don't think the example is valid F2003.
C628 (R628) An allocate-shape-spec-list shall appear if and only if the
allocate-object is an array.
This is relaxed in F 2008, though.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/44529] [F03] array allocation with SOURCE
[not found] <bug-44529-4@http.gcc.gnu.org/bugzilla/>
2011-02-06 12:19 ` [Bug fortran/44529] [F03] array allocation with SOURCE tkoenig at gcc dot gnu.org
@ 2012-02-17 9:42 ` burnus at gcc dot gnu.org
2013-07-25 12:17 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-17 9:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44529
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-17 09:07:30 UTC ---
See also PR 47616
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/44529] [F03] array allocation with SOURCE
[not found] <bug-44529-4@http.gcc.gnu.org/bugzilla/>
2011-02-06 12:19 ` [Bug fortran/44529] [F03] array allocation with SOURCE tkoenig at gcc dot gnu.org
2012-02-17 9:42 ` burnus at gcc dot gnu.org
@ 2013-07-25 12:17 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-07-25 12:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44529
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |burnus at gcc dot gnu.org
Resolution|--- |DUPLICATE
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Mark as duplicate of PR 44672.
*** This bug has been marked as a duplicate of bug 44672 ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/44529] [F03] array allocation with SOURCE
2010-06-13 20:52 [Bug fortran/44529] New: " janus at gcc dot gnu dot org
2010-06-13 21:38 ` [Bug fortran/44529] " janus at gcc dot gnu dot org
2010-06-15 9:40 ` burnus at gcc dot gnu dot org
@ 2010-08-29 18:06 ` burnus at gcc dot gnu dot org
2 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-29 18:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2010-08-29 18:05 -------
Cf. also PR 45440
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44529
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/44529] [F03] array allocation with SOURCE
2010-06-13 20:52 [Bug fortran/44529] New: " janus at gcc dot gnu dot org
2010-06-13 21:38 ` [Bug fortran/44529] " janus at gcc dot gnu dot org
@ 2010-06-15 9:40 ` burnus at gcc dot gnu dot org
2010-08-29 18:06 ` burnus at gcc dot gnu dot org
2 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-06-15 9:40 UTC (permalink / raw)
To: gcc-bugs
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2010-06-15 09:39:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44529
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/44529] [F03] array allocation with SOURCE
2010-06-13 20:52 [Bug fortran/44529] New: " janus at gcc dot gnu dot org
@ 2010-06-13 21:38 ` janus at gcc dot gnu dot org
2010-06-15 9:40 ` burnus at gcc dot gnu dot org
2010-08-29 18:06 ` burnus at gcc dot gnu dot org
2 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu dot org @ 2010-06-13 21:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from janus at gcc dot gnu dot org 2010-06-13 21:38 -------
(In reply to comment #0)
> First example:
>
>
> integer, allocatable :: a(:), b(:)
> allocate (a, source = b)
> end
>
>
> This is rejected with
>
> allocate (a, source = b)
> 1
> Error: Array specification required in ALLOCATE statement at (1)
>
> although it is valid (cf. F08:C633).
The error message is fixed with this patch:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 160678)
+++ gcc/fortran/resolve.c (working copy)
@@ -6449,10 +6449,10 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code
if (pointer || (dimension == 0 && codimension == 0))
goto success;
- /* Make sure the next-to-last reference node is an array specification. */
-
- if (ref2 == NULL || ref2->type != REF_ARRAY || ref2->u.ar.type == AR_FULL
- || (dimension && ref2->u.ar.dimen == 0))
+ /* F08:C633. */
+ if (!code->expr3
+ && (ref2 == NULL || ref2->type != REF_ARRAY || ref2->u.ar.type ==
AR_FULL
+ || (dimension && ref2->u.ar.dimen == 0)))
{
gfc_error ("Array specification required in ALLOCATE statement "
"at %L", &e->where);
But then this test case also ICEs:
c0a.f90:2:0: internal compiler error: in gfc_array_allocate, at
fortran/trans-array.c:4056
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44529
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-25 12:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-44529-4@http.gcc.gnu.org/bugzilla/>
2011-02-06 12:19 ` [Bug fortran/44529] [F03] array allocation with SOURCE tkoenig at gcc dot gnu.org
2012-02-17 9:42 ` burnus at gcc dot gnu.org
2013-07-25 12:17 ` burnus at gcc dot gnu.org
2010-06-13 20:52 [Bug fortran/44529] New: " janus at gcc dot gnu dot org
2010-06-13 21:38 ` [Bug fortran/44529] " janus at gcc dot gnu dot org
2010-06-15 9:40 ` burnus at gcc dot gnu dot org
2010-08-29 18:06 ` burnus 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).