[Bug fortran/40678] Using a function as variable: ICE with 4.3, accepts invalid with 4.4/4.5

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jul 8 07:36:00 GMT 2009



------- Comment #1 from burnus at gcc dot gnu dot org  2009-07-08 07:36 -------
I can reproduce the ICE with 4.1, 4.2 and 4.3 - but it no longer gives an ICE
with 4.4 or 4.5.

 * * *

However, there is also a bug in 4.4: It simply compiles.


Expected: Either an error of the form (NAG f95)

Error: aa.f90, line 6: Implicit type for SUNSHINE
       detected at SUNSHINE@<end-of-statement>

or -- better (or additionally) -- of the form

error #6423: This name has already been used as an external function name.  
[SUNSHINE]

 * * *

In 4.3.4 the following assert fails:
      /* Procedure actual arguments.  */
      else if (sym->attr.flavor == FL_PROCEDURE
               && se->expr != current_function_decl)
        {
          gcc_assert (se->want_pointer);


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |accepts-invalid, diagnostic,
                   |                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2009-07-08 07:36:28
               date|                            |
            Summary|ICE on invalid code,        |Using a function as
                   |gfc_conv_variable           |variable: ICE with 4.3,
                   |                            |accepts invalid with 4.4/4.5


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



More information about the Gcc-bugs mailing list