This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32867] New: [4.3 Regression] 459.GemsFDTD in SPEC CPU 2006 fails to compile
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jul 2007 14:59:37 -0000
- Subject: [Bug fortran/32867] New: [4.3 Regression] 459.GemsFDTD in SPEC CPU 2006 fails to compile
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This patch
http://gcc.gnu.org/ml/gcc-cvs/2007-07/msg00685.html
causes
(gdb) r readdata.f90 -quiet -dumpbase readdata.f90 -mtune=generic -auxbase
readdata -O2 -version -ffast-math -o readdata.s -fintrinsic-modules-path
/export/gnu/import/rrs/126826/usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.0/finclude
Starting program:
/export/gnu/import/rrs/126826/usr/libexec/gcc/x86_64-unknown-linux-gnu/4.3.0/f951
readdata.f90 -quiet -dumpbase readdata.f90 -mtune=generic -auxbase readdata -O2
-version -ffast-math -o readdata.s -fintrinsic-modules-path
/export/gnu/import/rrs/126826/usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.0/finclude
GNU F95 version 4.3.0 20070722 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 3.4.6 20060404 (Red Hat 3.4.6-8), GMP version
4.2.1, MPFR version 2.2.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Program received signal SIGSEGV, Segmentation fault.
0x00000000004072b5 in gfc_compare_string (a=0xe78f90, b=0xe79710)
at ../../src/gcc/fortran/arith.c:1171
1171 ac = (unsigned char) ((i < alen) ? a->value.character.string[i] :
' ');
(gdb) p a->value
$1 = {logical = 15170912, integer = {{_mp_alloc = 15170912, _mp_size = 0,
_mp_d = 0xe660fd}}, real = {{_mpfr_prec = 15170912,
_mpfr_sign = 15098109, _mpfr_exp = 14833104, _mpfr_d = 0x0}}, complex = {
r = {{_mpfr_prec = 15170912, _mpfr_sign = 15098109, _mpfr_exp = 14833104,
_mpfr_d = 0x0}}, i = {{_mpfr_prec = 0, _mpfr_sign = 0, _mpfr_exp = 0,
_mpfr_d = 0x0}}}, op = {operator = 15170912, uop = 0xe660fd,
op1 = 0xe255d0, op2 = 0x0}, function = {actual = 0xe77d60,
name = 0xe660fd "__trim_1", isym = 0xe255d0, esym = 0x0}, character = {
length = 15170912, string = 0xe660fd "__trim_1"}, constructor = 0xe77d60}
(gdb) p a->value.character
$2 = {length = 15170912, string = 0xe660fd "__trim_1"}
(gdb) list
1166
1167 for (i = 0; i < len; i++)
1168 {
1169 /* We cast to unsigned char because default char, if it is
signed,
1170 would lead to ac < 0 for string[i] > 127. */
1171 ac = (unsigned char) ((i < alen) ? a->value.character.string[i] :
' ');
1172 bc = (unsigned char) ((i < blen) ? b->value.character.string[i] :
' ');
1173
1174 if (ac < bc)
1175 return -1;
(gdb) p b->value.character.string
$3 = 0xe660fd "__trim_1"
(gdb) p a->value.character.string
$4 = 0xe660fd "__trim_1"
(gdb) p i
$5 = 741123
(gdb) p len
$6 = 15180528
(gdb) bt
#0 0x00000000004072b5 in gfc_compare_string (a=0xe78f90, b=0xe79710)
at ../../src/gcc/fortran/arith.c:1171
#1 0x0000000000407393 in gfc_compare_expr (op1=0xe78f90, op2=0xe79710)
at ../../src/gcc/fortran/arith.c:1126
#2 0x000000000045567a in resolve_code (code=0xe78b30, ns=0xe6e770)
at ../../src/gcc/fortran/resolve.c:4541
#3 0x00000000004558e4 in gfc_resolve_blocks (b=0xe75530, ns=0xe6e770)
at ../../src/gcc/fortran/resolve.c:5699
#4 0x0000000000454150 in resolve_code (code=0xe71740, ns=0xe6e770)
at ../../src/gcc/fortran/resolve.c:5758
#5 0x000000000045771b in resolve_codes (ns=0xe6e770)
at ../../src/gcc/fortran/resolve.c:8463
#6 0x00000000004576da in resolve_codes (ns=0xe63e70)
at ../../src/gcc/fortran/resolve.c:8455
#7 0x0000000000457755 in gfc_resolve (ns=0xe63e70)
at ../../src/gcc/fortran/resolve.c:8482
#8 0x000000000044acac in gfc_parse_file ()
at ../../src/gcc/fortran/parse.c:3270
#9 0x000000000046d7ce in gfc_be_parse_file (set_yydebug=<value optimized out>)
at ../../src/gcc/fortran/f95-lang.c:301
#10 0x00000000005f9f7e in toplev_main (argc=<value optimized out>,
argv=<value optimized out>) at ../../src/gcc/toplev.c:1044
#11 0x00000033b381c3fb in __libc_start_main () from /lib64/tls/libc.so.6
---Type <return> to continue, or q <return> to quit---
#12 0x00000000004053da in _start ()
(gdb)
Daniel, does it ring a bell?
--
Summary: [4.3 Regression] 459.GemsFDTD in SPEC CPU 2006 fails to
compile
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl at lucon dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32867