This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/25104] Non-initialization expr. as case-selector



------- Comment #3 from eedelman at gcc dot gnu dot org  2005-11-30 18:29 -------
(In reply to comment #2)
> context, so I'm not sure what to think here ...  I leave this as unconfirmed
> for now.

Ifort 8.1 reports the following error:

In a CASE statement, the case-value must be a constant expression.   [MAXLOC]
CASE(MAXLOC(K,1))
-----^

Which agrees with my interpretation of the F95 standard.  And now when I
actually try it in gfortran (:-)), I get an ICE:

erik:~$ gfortran huj.f90
huj.f90: In function 'MAIN__':
huj.f90:1: internal compiler error: in gfc_conv_constant_to_tree, at
fortran/trans-const.c:276

Confirmed as 'ice-on-invalid'.


-- 

eedelman at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-30 18:29:31
               date|                            |
            Summary|better diagnostic needed    |Non-initialization expr. as
                   |                            |case-selector


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25104


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]