This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/22619] New: [4.1 regression] Compilation failure for real_const_1.f and real_const_2.f90
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jul 2005 20:20:08 -0000
- Subject: [Bug middle-end/22619] New: [4.1 regression] Compilation failure for real_const_1.f and real_const_2.f90
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ gfortran -O3 real_const_2.f90
real_const_2.f90: In function 'MAIN__':
real_const_2.f90:23: 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 real_const_2.f90
! { dg-do run }
!
! Free form test program for PR 17941 (signed constants with spaces)
!
program real_const_2
complex c0, c1, c2, c3, c4
real rp(4), rn(4)
parameter (c0 = (-0.5, - 0.5))
parameter (c1 = (- 0.5, + 0.5))
parameter (c2 = (- 0.5E2, +0.5))
parameter (c3 = (-0.5, + 0.5E-2))
parameter (c4 = (- 1, + 1))
data rn /- 1.0, - 1d0, - 1.d0, - 10.d-1/
data rp /+ 1.0, + 1d0, + 1.d0, + 10.d-1/
real, parameter :: del = 1.e-5
if (abs(c0 - cmplx(-0.5,-0.5)) > del) call abort
if (abs(c1 - cmplx(-0.5,+0.5)) > del) call abort
if (abs(c2 - cmplx(-0.5E2,+0.5)) > del) call abort
if (abs(c3 - cmplx(-0.5,+0.5E-2)) > del) call abort
if (abs(c4 - cmplx(-1.0,+1.0)) > del) call abort
if (any (abs (rp - 1.0) > del)) call abort
if (any (abs (rn + 1.0) > del)) call abort
end program
$ gfortran -O3 real_const_2.f90
real_const_2.f90: In function 'MAIN__':
real_const_2.f90:23: 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 real_const_2.f90
! { dg-do run }
!
! Free form test program for PR 17941 (signed constants with spaces)
!
program real_const_2
complex c0, c1, c2, c3, c4
real rp(4), rn(4)
parameter (c0 = (-0.5, - 0.5))
parameter (c1 = (- 0.5, + 0.5))
parameter (c2 = (- 0.5E2, +0.5))
parameter (c3 = (-0.5, + 0.5E-2))
parameter (c4 = (- 1, + 1))
data rn /- 1.0, - 1d0, - 1.d0, - 10.d-1/
data rp /+ 1.0, + 1d0, + 1.d0, + 10.d-1/
real, parameter :: del = 1.e-5
if (abs(c0 - cmplx(-0.5,-0.5)) > del) call abort
if (abs(c1 - cmplx(-0.5,+0.5)) > del) call abort
if (abs(c2 - cmplx(-0.5E2,+0.5)) > del) call abort
if (abs(c3 - cmplx(-0.5,+0.5E-2)) > del) call abort
if (abs(c4 - cmplx(-1.0,+1.0)) > del) call abort
if (any (abs (rp - 1.0) > del)) call abort
if (any (abs (rn + 1.0) > del)) call abort
end program
$ gfortran -O3 real_const_2.f90
real_const_2.f90: In function 'MAIN__':
real_const_2.f90:23: 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.
$ gdb ~/libexec/gcc/i686-pc-linux-gnu/4.1.0/f951
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library
"/lib/tls/libthread_db.so.1".
(gdb) r real_const_2.f90
Starting program: /home/ig25/libexec/gcc/i686-pc-linux-gnu/4.1.0/f951
real_const_2.f90
MAIN__
Execution times (seconds)
expand : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 (50%) wall 12
kB ( 2%) ggc
TOTAL : 0.01 0.00 0.02 573 kB
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --disable-checking to disable checks.
Program exited normally.
(gdb) r -O3 real_const_2.f90
Starting program: /home/ig25/libexec/gcc/i686-pc-linux-gnu/4.1.0/f951 -O3
real_const_2.f90
MAIN__
Analyzing compilation unitPerforming intraprocedural optimizations
Assembling functions:
MAIN__
Program received signal SIGSEGV, Segmentation fault.
try_forward_edges (mode=Variable "mode" is not available.
) at ../../gcc-4.1/gcc/cfgcleanup.c:540
540 if (NOTE_P (insn))
(gdb) bt
#0 try_forward_edges (mode=Variable "mode" is not available.
) at ../../gcc-4.1/gcc/cfgcleanup.c:540
#1 0x081484d7 in cleanup_cfg (mode=9) at ../../gcc-4.1/gcc/cfgcleanup.c:1982
#2 0x08167afe in rest_of_handle_cse () at ../../gcc-4.1/gcc/cse.c:7782
#3 0x08396714 in execute_one_pass (pass=0x85ae400)
at ../../gcc-4.1/gcc/passes.c:790
#4 0x08396857 in execute_pass_list (pass=0x85ae400)
at ../../gcc-4.1/gcc/passes.c:822
#5 0x0839686a in execute_pass_list (pass=0x85b56e0)
at ../../gcc-4.1/gcc/passes.c:823
#6 0x080c51a6 in tree_rest_of_compilation (fndecl=0x4037d400)
at ../../gcc-4.1/gcc/tree-optimize.c:419
#7 0x083e0da2 in cgraph_expand_function (node=0x4034d888)
at ../../gcc-4.1/gcc/cgraphunit.c:1033
#8 0x083e3175 in cgraph_optimize () at ../../gcc-4.1/gcc/cgraphunit.c:1099
#9 0x08097dc5 in gfc_be_parse_file (set_yydebug=0)
at ../../gcc-4.1/gcc/fortran/f95-lang.c:267
#10 0x08364d85 in toplev_main (argc=5, argv=0xbffff694)
at ../../gcc-4.1/gcc/toplev.c:971
#11 0x40075974 in __libc_start_main () from /lib/tls/libc.so.6
#12 0x0804adb1 in _start () at ../sysdeps/i386/elf/start.S:102
--
Summary: [4.1 regression] Compilation failure for real_const_1.f
and real_const_2.f90
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22619