Bug 18913

Summary: [3.4 Regression] complex array of dimension 1 segfaults
Product: gcc Reporter: William Glover <wglover>
Component: middle-endAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED WONTFIX    
Severity: normal CC: gcc-bugs, toolchain
Priority: P2 Keywords: ice-on-valid-code
Version: 3.2.2   
Target Milestone: 3.4.6   
Host: Target:
Build: Known to work: 2.95.3 3.0.4
Known to fail: 3.2.3 3.3.3 3.4.0 3.4.6 Last reconfirmed: 2005-09-30 17:00:17

Description William Glover 2004-12-09 21:53:49 UTC
g77 -v -finit-local-zero -o complexarray.x complexarray.f
Driving: g77 -v -finit-local-zero -o complexarray.x complexarray.f -lfrtbegin
-lg2c -lm -shared-libgcc
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
 /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/f771 complexarray.f -quiet -dumpbase
complexarray.f -version -finit-local-zero -o /tmp/ccigILmk.s
GNU F77 version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) (i386-redhat-linux)
        compiled by GNU C version 3.2.2 20030222 (Red Hat Linux 3.2.2-5).
complexarray.f: In program `complexarray':
complexarray.f:3: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.


--=-dQpYkWQgoQ8sUxNsabjK
Content-Disposition: attachment; filename=complexarray.f
Content-Type: text/x-fortran; name=complexarray.f; charset=UTF-8
Content-Transfer-Encoding: 7bit

      PROGRAM complexarray

      COMPLEX foo(1)

      write(6,*)foo
      STOP
      END

--=-dQpYkWQgoQ8sUxNsabjK--
Comment 1 Andrew Pinski 2004-12-09 22:02:27 UTC
You might want to try 3.3.x or 3.4.x.
Comment 2 Bud Davis 2004-12-11 01:35:06 UTC
same results on 3.4.2
Comment 3 Andrew Pinski 2005-03-12 17:10:02 UTC
This is a regression also.
Comment 4 Toon Moene 2005-12-15 08:29:22 UTC
*** Bug 25424 has been marked as a duplicate of this bug. ***
Comment 5 Toon Moene 2005-12-27 12:24:57 UTC
This is not a g77 error.  The following C routine's compilation
fails in the same way - deep down in the middle world:

main()
{
    __complex c[1] = { 0.0 };
}
Comment 6 Gabriel Dos Reis 2006-02-28 09:47:39 UTC
won't fix for 3.4.6