This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25050] CSHIFT not allowed in initialization expression
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2005 19:06:13 -0000
- Subject: [Bug fortran/25050] CSHIFT not allowed in initialization expression
- References: <bug-25050-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2005-11-26 19:06 -------
The ice here is the same as the one in PR25049, but we shouldn't even come into
that part of the front-end. gfortran should recognize that CSHIFT is not
allowed here.
## gfortran ##
foo.f90:0: internal compiler error: in gfc_conv_array_initializer, at
fortran/trans-array.c:3108
## g95 ##
In file foo.f90:3
integer, parameter, dimension(2,2) :: B = CSHIFT(A,1)
1
Error: Function 'cshift' cannot appear in an initialization expression at (1)
## Intel ##
fortcom: Error: foo.f90, line 3: This intrinsic function is invalid in constant
expressions. [CSHIFT]
integer, parameter, dimension(2,2) :: B = CSHIFT(A,1)
--------------------------------------------^
compilation aborted for foo.f90 (code 1)
## Portland ##
PGF90-S-0459-Target of NULL() assignment must be a pointer (foo.f90: 3)
PGF90-S-0066-Too few data constants in initialization statement (foo.f90: 3)
0 inform, 0 warnings, 2 severes, 0 fatal for m
## Sun ##
module M
^
"foo.f90", Line = 1, Column = 8: ERROR: The compiler has detected errors in
module "M". No module information file will be created for this module.
integer, parameter, dimension(2,2) :: B = CSHIFT(A,1)
^
"foo.f90", Line = 3, Column = 45: ERROR: Intrinsic function "CSHIFT" is not
allowed in an initialization expression.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |25049
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2005-11-26 19:06:13
date| |
Summary|better diagnostic needed |CSHIFT not allowed in
| |initialization expression
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25050