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 #10 from paul dot richard dot thomas at cea dot fr  2006-06-06 06:47 -------
Noting the non-fortran tilt on this, it is interesting that

  implicit COMPLEX (a-z)
  CALL foo
CONTAINS
  SUBROUTINE foo
    t = s + s
  END SUBROUTINE foo
END

is OK and produces declarations for s and t in foo.  Alternatively, declaring s
and t in foo also works.

However,

  COMPLEX s, t
  CALL foo
CONTAINS
  SUBROUTINE foo
    t = s + s
  END SUBROUTINE foo
END

puts the declarations in MAIN__, thusly:

foo ()
{
  t = s + s;


MAIN__ ()
{
  complex4 s;
  complex4 t;
  static void foo (void);

  _gfortran_set_std (70, 127, 0);
  foo ();
}

and triggers the ICE for any optimization level.  In fortran parlance, it is
host or use association of the complex type that is broken.

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]