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 middle-end/27889] [4.1/4.2 Regression] ICE on complex assignment in nested function



------- Comment #12 from paul dot richard dot thomas at cea dot fr  2006-06-09 08:50 -------
(In reply to comment #11)
> (In reply to comment #10)
> >   implicit COMPLEX (a-z)
> Does that actually declare the variables in MAIN or just say after the first
> use, they are declared in that function as complex?
> (this should be noted as a seperate bug if it really should declared the
> variables in the "program" instead of the function).

They are declared in MAIN and the type information should be host associated to
the variables in the function.

According to the gfortran parse tree, this is happening correctly:

$ /irun/bin/gfortran  -fdump-parse-tree pr27889.f90

        Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4)
        procedure name = MAIN__
        symtree: t  Ambig 0
        symbol t (COMPLEX 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC
)

        symtree: foo  Ambig 0
        symbol foo (UNKNOWN 0)(PROCEDURE UNKNOWN-INTENT UNKNOWN-ACCESS
INTERNAL-
PROC SUBROUTINE)

        symtree: MAIN__  Ambig 0
        symbol MAIN__ (UNKNOWN 0)(PROCEDURE UNKNOWN-INTENT PUBLIC UNKNOWN-PROC
S
UBROUTINE)

        symtree: s  Ambig 0
        symbol s (COMPLEX 4)(VARIABLE UNKNOWN-INTENT UNKNOWN-ACCESS
UNKNOWN-PROC
)


      CALL foo ()

        CONTAINS

          Namespace: A-H: (REAL 4) I-N: (INTEGER 4) O-Z: (REAL 4)
          procedure name = foo
          symtree: foo  Ambig 0 from namespace MAIN__

      ASSIGN MAIN__:t (+ MAIN__:s MAIN__:s)


pr27889.f90: In function 'foo':
pr27889.f90:2: error: invalid operand to binary operator
D.907

pr27889.f90:2: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


This is rather like that parameter bug, isn't it, Andrew? ie. type information
is not getting correctly broadcast to enclosed procedure blocks.

Paul


-- 


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


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