public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50071] New: gfortran does not distinguish labels in different type scoping units
@ 2011-08-13 7:15 zeccav at gmail dot com
2011-08-13 11:15 ` [Bug fortran/50071] " mikael at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2011-08-13 7:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50071
Bug #: 50071
Summary: gfortran does not distinguish labels in different type
scoping units
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zeccav@gmail.com
Created attachment 24999
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24999
just compile it
gfortran does not distinguish labels in different type scoping units
g95 and Intel ifort compile correctly
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50071] gfortran does not distinguish labels in different type scoping units
2011-08-13 7:15 [Bug fortran/50071] New: gfortran does not distinguish labels in different type scoping units zeccav at gmail dot com
@ 2011-08-13 11:15 ` mikael at gcc dot gnu.org
2011-08-13 11:22 ` mikael at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2011-08-13 11:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50071
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #1 from Mikael Morin <mikael at gcc dot gnu.org> 2011-08-13 11:05:19 UTC ---
OK, it's valid.
But is there any real need for this?
The labels in the derived types aren't usable, are they? One could just throw
them away.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50071] gfortran does not distinguish labels in different type scoping units
2011-08-13 7:15 [Bug fortran/50071] New: gfortran does not distinguish labels in different type scoping units zeccav at gmail dot com
2011-08-13 11:15 ` [Bug fortran/50071] " mikael at gcc dot gnu.org
@ 2011-08-13 11:22 ` mikael at gcc dot gnu.org
2011-08-18 12:45 ` burnus at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2011-08-13 11:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50071
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-08-13
AssignedTo|unassigned at gcc dot |mikael at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> 2011-08-13 11:14:28 UTC ---
Created attachment 25002
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25002
Patch to accept comment #0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50071] gfortran does not distinguish labels in different type scoping units
2011-08-13 7:15 [Bug fortran/50071] New: gfortran does not distinguish labels in different type scoping units zeccav at gmail dot com
2011-08-13 11:15 ` [Bug fortran/50071] " mikael at gcc dot gnu.org
2011-08-13 11:22 ` mikael at gcc dot gnu.org
@ 2011-08-18 12:45 ` burnus at gcc dot gnu.org
2011-08-18 21:57 ` mikael at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-18 12:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50071
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-18 12:36:21 UTC ---
Submitted patch by Mikael: http://gcc.gnu.org/ml/fortran/2011-08/msg00127.html
The submitted patch fixes the issue of comment 0 and an issue affecting BLOCK
and ASSOCIATE.
It does not fix the following two programs, which should be valid and are
currently rejected.
! ----------
1 type t
integer :: i
end type t
goto 1
1 print *, 'Hello'
end
! ----------
block
goto 1
print *, 'Hello'
1 continue
end block
1 continue
end
Regarding the validity of the latter, I have now asked at J3:
http://j3-fortran.org/pipermail/j3/2011-August/004585.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50071] gfortran does not distinguish labels in different type scoping units
2011-08-13 7:15 [Bug fortran/50071] New: gfortran does not distinguish labels in different type scoping units zeccav at gmail dot com
` (2 preceding siblings ...)
2011-08-18 12:45 ` burnus at gcc dot gnu.org
@ 2011-08-18 21:57 ` mikael at gcc dot gnu.org
2011-08-18 23:05 ` mikael at gcc dot gnu.org
2011-08-19 0:45 ` mikael at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2011-08-18 21:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50071
--- Comment #4 from Mikael Morin <mikael at gcc dot gnu.org> 2011-08-18 21:39:47 UTC ---
Author: mikael
Date: Thu Aug 18 21:39:42 2011
New Revision: 177882
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177882
Log:
2011-08-18 Mikael Morin <mikael.morin@sfr.fr>
PR fortran/50071
* symbol.c (gfc_get_st_label): Use the derived type namespace when
we are parsing a derived type definition.
2011-08-18 Mikael Morin <mikael.morin@sfr.fr>
PR fortran/50071
* gfortran.dg/duplicate_labels_2.f: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/duplicate_labels_2.f
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/symbol.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50071] gfortran does not distinguish labels in different type scoping units
2011-08-13 7:15 [Bug fortran/50071] New: gfortran does not distinguish labels in different type scoping units zeccav at gmail dot com
` (3 preceding siblings ...)
2011-08-18 21:57 ` mikael at gcc dot gnu.org
@ 2011-08-18 23:05 ` mikael at gcc dot gnu.org
2011-08-19 0:45 ` mikael at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2011-08-18 23:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50071
--- Comment #5 from Mikael Morin <mikael at gcc dot gnu.org> 2011-08-18 22:42:45 UTC ---
Author: mikael
Date: Thu Aug 18 22:42:38 2011
New Revision: 177885
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177885
Log:
2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
PR fortran/50071
* gfortran.h (gfc_exec_op): New constant EXEC_END_NESTED_BLOCK.
* parse.c (check_statement_label): Accept ST_END_BLOCK and
ST_END_ASSOCIATE as valid branch target.
(accept_statement): Change EXEC_END_BLOCK to EXEC_END_NESTED_BLOCK.
Add EXEC_END_BLOCK code in the ST_END_BLOCK and ST_END_ASSOCIATE cases.
* resolve.c (find_reachable_labels): Change EXEC_END_BLOCK to
EXEC_END_NESTED_BLOCK.
(resolve_branch): Ditto.
(resolve_code): Add EXEC_END_NESTED_BLOCK case.
* st.c (gfc_free_statement): Ditto.
* trans.c (trans_code): Ditto.
2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
PR fortran/50071
* gfortran.dg/end_block_label_1.f90: New test.
* gfortran.dg/end_associate_label_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/end_associate_label_1.f90
trunk/gcc/testsuite/gfortran.dg/end_block_label_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/parse.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/st.c
trunk/gcc/fortran/trans.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50071] gfortran does not distinguish labels in different type scoping units
2011-08-13 7:15 [Bug fortran/50071] New: gfortran does not distinguish labels in different type scoping units zeccav at gmail dot com
` (4 preceding siblings ...)
2011-08-18 23:05 ` mikael at gcc dot gnu.org
@ 2011-08-19 0:45 ` mikael at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2011-08-19 0:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50071
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Mikael Morin <mikael at gcc dot gnu.org> 2011-08-18 23:21:04 UTC ---
(In reply to comment #3)
> ! ----------
> 1 type t
> integer :: i
> end type t
>
> goto 1
> 1 print *, 'Hello'
> end
This is now PR 50121
>
> ! ----------
> block
> goto 1
> print *, 'Hello'
> 1 continue
> end block
> 1 continue
> end
This is now PR 50122
Comment #4 fixed the original issue, and comment #5 an additional one raised by
Tobias. The remaining problems are tracked elsewhere, so this is FIXED.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-08-18 23:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-13 7:15 [Bug fortran/50071] New: gfortran does not distinguish labels in different type scoping units zeccav at gmail dot com
2011-08-13 11:15 ` [Bug fortran/50071] " mikael at gcc dot gnu.org
2011-08-13 11:22 ` mikael at gcc dot gnu.org
2011-08-18 12:45 ` burnus at gcc dot gnu.org
2011-08-18 21:57 ` mikael at gcc dot gnu.org
2011-08-18 23:05 ` mikael at gcc dot gnu.org
2011-08-19 0:45 ` mikael at gcc dot gnu.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).