User account creation filtered due to spam.

Bug 19021 - segfault and ice on invalid print statements
Summary: segfault and ice on invalid print statements
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 minor
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks: 19292
  Show dependency treegraph
 
Reported: 2004-12-15 21:40 UTC by Thomas Koenig
Modified: 2005-03-17 02:14 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-12-16 06:30:50


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Koenig 2004-12-15 21:40:32 UTC
I couldn't find these in the bug database.

$ cat typo-array.f90
  integer :: i(2)
  print i
end
$ gfortran typo-array.f90
typo-array.f90: In function 'MAIN__':
typo-array.f90:2: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$ cat typo-array2.f90
  integer :: i(2)
  print i(2)
end
$ gfortran typo-array2.f90
typo-array2.f90: In function 'MAIN__':
typo-array2.f90:2: internal compiler error: tree check: expected class
'declaration', have 'reference' (array_ref) in set_string, at fortran/trans-io.c:413
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$ gfortran -v
Reading specs from /home/ig25/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --prefix=/home/ig25 --enable-languages=c,c++,f95
Thread model: posix
gcc version 4.0.0 20041213 (experimental)
Comment 1 Andrew Pinski 2004-12-16 06:30:49 UTC
Confirmed, note this are two different bugs really.

The first one is related to PR 18781.
Comment 2 Andrew Pinski 2005-03-17 02:14:37 UTC
Both testcases now fail with an error message:
 In file t.f:2

  print i(2)
      1
Error: Variable 'i' has not been assigned a format label at (1)

 In file t.f:2

  print i
      1
Error: Variable 'i' has not been assigned a format label at (1)