This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/12366] [gfortran] array assignment fails
- From: "Tobias dot Schlueter at physik dot uni-muenchen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2004 16:25:34 -0000
- Subject: [Bug fortran/12366] [gfortran] array assignment fails
- References: <20030922131506.12366.tcc@sentex.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de 2004-05-05 16:25 -------
(In reply to comment #2)
> The current tree seems to ignore the assignment which failed before. I'll see if
Looks like I had messed up the testcase. Seems like even cut'n'paste ain't
foolproof.
What is happening is this:
[tobi@marktplatz tests]$ gfortran pr12366.f90 -fdump-parse-tree
Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4)
symtree: a Ambig 0
symbol a (REAL 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC
DIMENSION)
Array spec:(1 AS_EXPLICIT 1 5 )
symtree: b Ambig 0
symbol b (REAL 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC
DIMENSION)
Array spec:(1 AS_EXPLICIT 1 3 )
symtree: testg Ambig 0
symbol testg (UNKNOWN 0)(PROGRAM UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC)
ASSIGN a(FULL) (/ 0.15e1 , 0.21e1 , 0.32e1 , 0.46e1 , 0.53e1 /)
ASSIGN b(FULL) a((/ 2 , 3 , 1 /):)
WRITE UNIT=6 FMT=-1
TRANSFER b(FULL)
DT_END
f951: ../../gcc/gcc/fortran/trans-array.c:1067: gfc_conv_ss_descriptor:
Assertion `ss->expr->expr_type == EXPR_VARIABLE' failed.
pr12366.f90: In function `MAIN__':
pr12366.f90:5: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[tobi@marktplatz tests]$
Note the assignment to b:
ASSIGN b(FULL) a((/ 2 , 3 , 1 /):)
^ this is probably our bug
An array index of the form (/.../) should not be matched as an open-ended range.
(It could also be that the parse-tree dumper is at fault, and the problem is
somewhere else.) I'll see if can cook up a patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12366