Bug 16535 - ICE writing a character array
Summary: ICE writing a character array
Status: RESOLVED DUPLICATE of bug 15966
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-07-14 11:35 UTC by Erik Schnetter
Modified: 2004-07-14 15:09 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2004-07-14 13:49:08


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Schnetter 2004-07-14 11:35:30 UTC
The following subroutine leads to an ICE: 
 
subroutine MPWT_transform_metric 
  integer   :: info 
  character :: msg(1000) 
  write (msg, '("Error in call to DGESV, info=",i4)') info 
end subroutine MPWT_transform_metric 
 
with 
 
GNU Fortran 95 (GCC 3.5.0 20040713 (experimental)) 
 
The code is strange in that msg is an array of one-character strings instead 
of a single string.
Comment 1 Volker Reichelt 2004-07-14 13:49:07 UTC
Confirmed.
Even shorter example:

===========================
subroutine FOO
  character :: msg(10)
  write (msg, *)
end subroutine FOO
===========================
Comment 2 Andrew Pinski 2004-07-14 15:09:53 UTC

*** This bug has been marked as a duplicate of 15966 ***