public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31716]  New: segfault after mixing declarations and executable statements
@ 2007-04-26 18:50 tkoenig at gcc dot gnu dot org
  2007-04-26 21:47 ` [Bug fortran/31716] segfault with real array bounds tkoenig at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-04-26 18:50 UTC (permalink / raw)
  To: gcc-bugs

$ cat exponent-3.f90
program main
  real, parameter :: n = 1024, iter=1000
  real, dimension(n) :: num1,num2
  call random_number(num1)
  real :: start
  do i=1,iter
    num2 = num1**2
  end do
end program main
$ gfortran exponent-3.f90
exponent-3.f90:5.15:

  real :: start
              1
Error: Unexpected data declaration statement at (1)
exponent-3.f90:3.18:

  real, dimension(n) :: num1,num2
                 1
Error: Expression at (1) must be of INTEGER type
exponent-3.f90:3.33:

  real, dimension(n) :: num1,num2
                                1
Error: The module or main program array 'num2' at (1) must have constant shape
exponent-3.f90:3.18:

  real, dimension(n) :: num1,num2
                 1
Error: Expression at (1) must be of INTEGER type
exponent-3.f90:3.28:

  real, dimension(n) :: num1,num2
                           1
Error: The module or main program array 'num1' at (1) must have constant shape
exponent-3.f90:0: 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.
$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../../gcc/trunk/configure --prefix=/home/ig25
--enable-maintainer-mode --enable-languages=c,fortran
Thread model: posix
gcc version 4.3.0 20070419 (experimental)

The backtrace is confused, looks like a smashed stack:

Error: The module or main program array 'num1' at (1) must have constant shape

Program received signal SIGSEGV, Segmentation fault.
0xb7ef8103 in __gmpz_sub () from /usr/local/lib/libgmp.so.3
(gdb) bt
#0  0xb7ef8103 in __gmpz_sub () from /usr/local/lib/libgmp.so.3
#1  0xb7edf840 in ?? () from /usr/local/lib/libgmp.so.3
#2  0x0860eca0 in ?? ()
#3  0x0000000b in ?? ()
#4  0x0860f508 in ?? ()
#5  0x00000001 in ?? ()
#6  0x00000001 in ?? ()
#7  0x00000004 in ?? ()
#8  0x0860eca0 in ?? ()
#9  0x00000000 in ?? ()


-- 
           Summary: segfault after mixing declarations and executable
                    statements
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-05-24  5:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-26 18:50 [Bug fortran/31716] New: segfault after mixing declarations and executable statements tkoenig at gcc dot gnu dot org
2007-04-26 21:47 ` [Bug fortran/31716] segfault with real array bounds tkoenig at gcc dot gnu dot org
2007-05-01 13:18 ` tkoenig at gcc dot gnu dot org
2007-05-01 13:56 ` jvdelisle at gcc dot gnu dot org
2007-05-02  3:19 ` jvdelisle at gcc dot gnu dot org
2007-05-12  5:03 ` jvdelisle at gcc dot gnu dot org
2007-05-17 19:27 ` dfranke at gcc dot gnu dot org
2007-05-18  2:13 ` jvdelisle at gcc dot gnu dot org
2007-05-18  7:50 ` dfranke at gcc dot gnu dot org
2007-05-18  7:53 ` dfranke at gcc dot gnu dot org
2007-05-18 22:59 ` jvdelisle at gcc dot gnu dot org
2007-05-19  0:30 ` patchapp at dberlin dot org
2007-05-24  5:04 ` jvdelisle at gcc dot gnu dot org
2007-05-24  5:06 ` jvdelisle at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).