public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/34557] New: Rejects valid: EQUIVALENCE of character substrings
@ 2007-12-22 19:10 burnus at gcc dot gnu dot org
2008-01-02 23:01 ` [Bug fortran/34557] [4.3 regression] " tkoenig at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-12-22 19:10 UTC (permalink / raw)
To: gcc-bugs
! Rejects valid. EQUIVALENCE of substrings; fails with 4.[1-3].x with:
!
!EQUIVALENCE (A (2,1) (1:1), B (1) (2:3), C (3:5))
! 1
!Error: Syntax error in EQUIVALENCE statement at (1)
!
! Found using the Fortran Company Fortran 90 Test Suite (Lite),
! Version 1.4
CHARACTER A(2,2)*2, B(2)*3, C*5
EQUIVALENCE (A (2,1) (1:1), B (1) (2:3), C (3:5))
end
--
Summary: Rejects valid: EQUIVALENCE of character substrings
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
OtherBugsDependingO 32834
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/34557] [4.3 regression] Rejects valid: EQUIVALENCE of character substrings
2007-12-22 19:10 [Bug fortran/34557] New: Rejects valid: EQUIVALENCE of character substrings burnus at gcc dot gnu dot org
@ 2008-01-02 23:01 ` tkoenig at gcc dot gnu dot org
2008-01-03 15:18 ` burnus at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-01-02 23:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tkoenig at gcc dot gnu dot org 2008-01-02 22:38 -------
Confirmed. This is a regression vs. 4.2:
$ cat foo.f
! Rejects valid. EQUIVALENCE of substrings; fails with 4.[1-3].x with:
!
!EQUIVALENCE (A (2,1) (1:1), B (1) (2:3), C (3:5))
! 1
!Error: Syntax error in EQUIVALENCE statement at (1)
!
! Found using the Fortran Company Fortran 90 Test Suite (Lite),
! Version 1.4
CHARACTER A(2,2)*2, B(2)*3, C*5
EQUIVALENCE (A (2,1) (1:1), B (1) (2:3), C (3:5))
end
$ gfortran-4.2 foo.f
$
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.3.0
Known to work| |4.2.3
Last reconfirmed|0000-00-00 00:00:00 |2008-01-02 22:38:48
date| |
Summary|Rejects valid: EQUIVALENCE |[4.3 regression] Rejects
|of character substrings |valid: EQUIVALENCE of
| |character substrings
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/34557] [4.3 regression] Rejects valid: EQUIVALENCE of character substrings
2007-12-22 19:10 [Bug fortran/34557] New: Rejects valid: EQUIVALENCE of character substrings burnus at gcc dot gnu dot org
2008-01-02 23:01 ` [Bug fortran/34557] [4.3 regression] " tkoenig at gcc dot gnu dot org
@ 2008-01-03 15:18 ` burnus at gcc dot gnu dot org
2008-01-03 16:11 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-01-03 15:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2008-01-03 12:53 -------
> Confirmed. This is a regression vs. 4.2:
I think it is not a regression with regards to 4.1 or 4.2. Here, it gives no
ICE/error/warning for .f (fixed-form source) but it does so for .f90 (free-form
source).
With free-form source, it works if one changes
EQUIVALENCE (A (2,1) (1:1), B (1) (2:3), C (3:5))
into
EQUIVALENCE (A (2,1)(1:1), B (1)(2:3), C(3:5))
Which explains why fixed form works and indicates what we do not eat the
whitespaces when matching a substring.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/34557] [4.3 regression] Rejects valid: EQUIVALENCE of character substrings
2007-12-22 19:10 [Bug fortran/34557] New: Rejects valid: EQUIVALENCE of character substrings burnus at gcc dot gnu dot org
2008-01-02 23:01 ` [Bug fortran/34557] [4.3 regression] " tkoenig at gcc dot gnu dot org
2008-01-03 15:18 ` burnus at gcc dot gnu dot org
@ 2008-01-03 16:11 ` burnus at gcc dot gnu dot org
2008-01-03 20:13 ` tkoenig at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-01-03 16:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2008-01-03 15:38 -------
Patch.
Index: gcc/fortran/primary.c
===================================================================
--- gcc/fortran/primary.c (Revision 131302)
+++ gcc/fortran/primary.c (Arbeitskopie)
@@ -1679,6 +1679,7 @@ match_varspec (gfc_expr *primary, int eq
tail = NULL;
+ gfc_gobble_whitespace ();
if ((equiv_flag && gfc_peek_char () == '(') || sym->attr.dimension)
{
/* In EQUIVALENCE, we don't know yet whether we are seeing
@@ -1692,6 +1693,7 @@ match_varspec (gfc_expr *primary, int eq
if (m != MATCH_YES)
return m;
+ gfc_gobble_whitespace ();
if (equiv_flag && gfc_peek_char () == '(')
{
tail = extend_ref (primary, tail);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/34557] [4.3 regression] Rejects valid: EQUIVALENCE of character substrings
2007-12-22 19:10 [Bug fortran/34557] New: Rejects valid: EQUIVALENCE of character substrings burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-01-03 16:11 ` burnus at gcc dot gnu dot org
@ 2008-01-03 20:13 ` tkoenig at gcc dot gnu dot org
2008-01-04 9:27 ` burnus at gcc dot gnu dot org
2008-01-04 9:34 ` [Bug fortran/34557] " burnus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-01-03 20:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tkoenig at gcc dot gnu dot org 2008-01-03 20:00 -------
(In reply to comment #3)
> Patch.
Looks obvious and simple.
OK to commit if it passes regression-test.
Thomas
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/34557] [4.3 regression] Rejects valid: EQUIVALENCE of character substrings
2007-12-22 19:10 [Bug fortran/34557] New: Rejects valid: EQUIVALENCE of character substrings burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-01-03 20:13 ` tkoenig at gcc dot gnu dot org
@ 2008-01-04 9:27 ` burnus at gcc dot gnu dot org
2008-01-04 9:34 ` [Bug fortran/34557] " burnus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-01-04 9:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2008-01-04 09:12 -------
Subject: Bug 34557
Author: burnus
Date: Fri Jan 4 09:11:26 2008
New Revision: 131317
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131317
Log:
2008-01-04 Tobias Burnus <burnus@net-b.de>
PR fortran/34557
* primary.c (match_varspec): Gobble whitespace before
checking for '('.
2008-01-04 Tobias Burnus <burnus@net-b.de>
PR fortran/34557
* gfortran.dg/equiv_substr.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/equiv_substr.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/primary.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/34557] Rejects valid: EQUIVALENCE of character substrings
2007-12-22 19:10 [Bug fortran/34557] New: Rejects valid: EQUIVALENCE of character substrings burnus at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-01-04 9:27 ` burnus at gcc dot gnu dot org
@ 2008-01-04 9:34 ` burnus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-01-04 9:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from burnus at gcc dot gnu dot org 2008-01-04 09:16 -------
FIXED on the trunk (4.3.0).
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work|4.2.3 |
Resolution| |FIXED
Summary|[4.3 regression] Rejects |Rejects valid: EQUIVALENCE
|valid: EQUIVALENCE of |of character substrings
|character substrings |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34557
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-01-04 9:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-22 19:10 [Bug fortran/34557] New: Rejects valid: EQUIVALENCE of character substrings burnus at gcc dot gnu dot org
2008-01-02 23:01 ` [Bug fortran/34557] [4.3 regression] " tkoenig at gcc dot gnu dot org
2008-01-03 15:18 ` burnus at gcc dot gnu dot org
2008-01-03 16:11 ` burnus at gcc dot gnu dot org
2008-01-03 20:13 ` tkoenig at gcc dot gnu dot org
2008-01-04 9:27 ` burnus at gcc dot gnu dot org
2008-01-04 9:34 ` [Bug fortran/34557] " 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).