public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/34872] New: Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2)
@ 2008-01-19 17:13 michael dot a dot richmond at nasa dot gov
2008-01-19 17:17 ` [Bug fortran/34872] [4.3 Regression] " burnus at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2008-01-19 17:13 UTC (permalink / raw)
To: gcc-bugs
When I compile the function listed below using the January 18 snapshot of
gfortran, I get the following error:
t.f90:2.2:
10 CONTINUE
1
t.f90:3.7:
GOTO 10
2
Error: Statement at (1) is not a valid branch target statement for the branch
statement at (2)
I believe it applies to all platforms.
CHARACTER FUNCTION t()
10 CONTINUE
GOTO 10
t = ' '
END FUNCTION t
--
Summary: Spurious error in snapshot of 01/18/08: Statement at (1)
is not a valid branch target statement for the branch
statement at (2)
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot a dot richmond at nasa dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34872
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/34872] [4.3 Regression] Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2)
2008-01-19 17:13 [Bug fortran/34872] New: Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2) michael dot a dot richmond at nasa dot gov
@ 2008-01-19 17:17 ` burnus at gcc dot gnu dot org
2008-01-19 22:52 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-01-19 17:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2008-01-19 16:03 -------
Confirm. I think it is a fallout of Paul's typespec patch (PR 34429 et alia).
In resolve_branch (which prints the error message), label->defined ==
ST_LABEL_BAD_TARGET.
The problem is probably that ST_GET_FCN_CHARACTERISTICS is not taken care of
correctly. check_statement_label has:
switch (st)
{
case ST_END_PROGRAM: [... some more ST_END*]
case_executable:
case_exec_markers:
type = ST_LABEL_TARGET;
case ST_FORMAT:
type = ST_LABEL_FORMAT;
default:
type = ST_LABEL_BAD_TARGET;
The question is now whether one simply adds the ST_GET_FCN_CHARACTERISTICS to
the cases or whether one adds it to, e.g., "#define case_executable" ?
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2008-01-19 16:03:40
date| |
Summary|Spurious error in snapshot |[4.3 Regression] Spurious
|of 01/18/08: Statement at |error in snapshot of
|(1) is not a valid branch |01/18/08: Statement at (1)
|target statement for the |is not a valid branch target
|branch statement at (2) |statement for the branch
| |statement at (2)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34872
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/34872] [4.3 Regression] Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2)
2008-01-19 17:13 [Bug fortran/34872] New: Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2) michael dot a dot richmond at nasa dot gov
2008-01-19 17:17 ` [Bug fortran/34872] [4.3 Regression] " burnus at gcc dot gnu dot org
@ 2008-01-19 22:52 ` pinskia at gcc dot gnu dot org
2008-01-20 18:02 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-19 22:52 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34872
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/34872] [4.3 Regression] Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2)
2008-01-19 17:13 [Bug fortran/34872] New: Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2) michael dot a dot richmond at nasa dot gov
2008-01-19 17:17 ` [Bug fortran/34872] [4.3 Regression] " burnus at gcc dot gnu dot org
2008-01-19 22:52 ` pinskia at gcc dot gnu dot org
@ 2008-01-20 18:02 ` jakub at gcc dot gnu dot org
2008-01-23 7:13 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-01-20 18:02 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34872
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/34872] [4.3 Regression] Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2)
2008-01-19 17:13 [Bug fortran/34872] New: Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2) michael dot a dot richmond at nasa dot gov
` (2 preceding siblings ...)
2008-01-20 18:02 ` jakub at gcc dot gnu dot org
@ 2008-01-23 7:13 ` pault at gcc dot gnu dot org
2008-01-23 9:22 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-23 7:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2008-01-23 06:48 -------
I do not see how to fix this one at the moment - Tobias' suggestion and other
attempts meet with a variety of rejections. I'll come back to it but must have
a final stab at PR34429 before we time out on bug fixes.
Thanks for the PR, Michael
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|2008-01-19 16:03:40 |2008-01-23 06:48:26
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34872
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/34872] [4.3 Regression] Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2)
2008-01-19 17:13 [Bug fortran/34872] New: Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2) michael dot a dot richmond at nasa dot gov
` (3 preceding siblings ...)
2008-01-23 7:13 ` pault at gcc dot gnu dot org
@ 2008-01-23 9:22 ` pault at gcc dot gnu dot org
2008-01-24 10:06 ` pault at gcc dot gnu dot org
2008-01-24 10:18 ` pault at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-23 9:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2008-01-23 08:54 -------
Having slept on it, I know where the problem is - old_locus in decode_statement
points to the whitespace after a statement label. In consequence, if the label
is deleted, it is not parsed again.
A fix is regtesting.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34872
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/34872] [4.3 Regression] Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2)
2008-01-19 17:13 [Bug fortran/34872] New: Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2) michael dot a dot richmond at nasa dot gov
` (4 preceding siblings ...)
2008-01-23 9:22 ` pault at gcc dot gnu dot org
@ 2008-01-24 10:06 ` pault at gcc dot gnu dot org
2008-01-24 10:18 ` pault at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-24 10:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2008-01-24 08:41 -------
Subject: Bug 34872
Author: pault
Date: Thu Jan 24 08:40:38 2008
New Revision: 131777
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131777
Log:
2008-01-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34872
* parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
seen, check for a statement label and, if present, delete it
and set the locus to the start of the statement.
2008-01-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34872
* gfortran.dg/function_charlen_3.f: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/function_charlen_3.f
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/parse.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34872
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/34872] [4.3 Regression] Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2)
2008-01-19 17:13 [Bug fortran/34872] New: Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2) michael dot a dot richmond at nasa dot gov
` (5 preceding siblings ...)
2008-01-24 10:06 ` pault at gcc dot gnu dot org
@ 2008-01-24 10:18 ` pault at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-24 10:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2008-01-24 08:43 -------
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=34872
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-01-24 8:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-19 17:13 [Bug fortran/34872] New: Spurious error in snapshot of 01/18/08: Statement at (1) is not a valid branch target statement for the branch statement at (2) michael dot a dot richmond at nasa dot gov
2008-01-19 17:17 ` [Bug fortran/34872] [4.3 Regression] " burnus at gcc dot gnu dot org
2008-01-19 22:52 ` pinskia at gcc dot gnu dot org
2008-01-20 18:02 ` jakub at gcc dot gnu dot org
2008-01-23 7:13 ` pault at gcc dot gnu dot org
2008-01-23 9:22 ` pault at gcc dot gnu dot org
2008-01-24 10:06 ` pault at gcc dot gnu dot org
2008-01-24 10:18 ` 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).