This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32943] New: char_associated_1_red.f90 gives an ICE with -fdefault-integer-8
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jul 2007 10:15:13 -0000
- Subject: [Bug fortran/32943] New: char_associated_1_red.f90 gives an ICE with -fdefault-integer-8
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This test is difficult to reduce further. The ICE disappears if the line
if (.not. associated (ptr, a)) call abort
is commented. Removing .not. in the above line does not change ICE. The test
pass with -m64.
gdb session:
(gdb) run -fdefault-integer-8 char_associated_1_db.f90
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /opt/gcc/gcc4.3l/libexec/gcc/powerpc-apple-darwin8/4.3.0/f951
-fdefault-integer-8 char_associated_1_db.f90
Reading symbols for shared libraries . done
MAIN__
Breakpoint 1, fancy_abort (file=0x6f8bbc
"../../gcc-4.3-20070727/gcc/simplify-rtx.c", line=4676, function=0x720100
"simplify_subreg") at ../../gcc-4.3-20070727/gcc/diagnostic.c:655
655 internal_error ("in %s, at %s:%d", function, trim_filename (file),
line);
(gdb) backtrace
#0 fancy_abort (file=0x6f8bbc "../../gcc-4.3-20070727/gcc/simplify-rtx.c",
line=4676, function=0x720100 "simplify_subreg") at
../../gcc-4.3-20070727/gcc/diagnostic.c:655
#1 0x0048cfb8 in simplify_subreg (outermode=SImode, op=0x43680080,
innermode=DImode, byte=0) at ../../gcc-4.3-20070727/gcc/simplify-rtx.c:4675
#2 0x0048d450 in simplify_gen_subreg (outermode=SImode, op=0x43680080,
innermode=DImode, byte=0) at ../../gcc-4.3-20070727/gcc/simplify-rtx.c:4972
#3 0x0020492c in operand_subword_force (op=0x43680080, offset=0, mode=DImode)
at ../../gcc-4.3-20070727/gcc/emit-rtl.c:1371
#4 0x00289854 in expand_binop (mode=DImode, binoptab=0x4362a400,
op0=0x43680080, op1=0x43680040, target=0x43680020, unsignedp=1,
methods=OPTAB_LIB_WIDEN) at ../../gcc-4.3-20070727/gcc/optabs.c:1582
#5 0x0021c858 in expand_expr_real_1 (exp=0x4367e6f0, target=0x4362a400,
tmode=DImode, modifier=EXPAND_NORMAL, alt_rtl=0xbfffd958) at
../../gcc-4.3-20070727/gcc/expr.c:9168
#6 0x0022c2ec in expand_expr_real (exp=0x4367e6f0, target=0x43680020,
tmode=DImode, modifier=EXPAND_NORMAL, alt_rtl=0xbfffd958) at
../../gcc-4.3-20070727/gcc/expr.c:6902
#7 0x00232928 in store_expr (exp=0x4367e6f0, target=0x43680020,
call_param_p=0, nontemporal=0 '\0') at ../../gcc-4.3-20070727/gcc/expr.c:4482
#8 0x00234ca0 in expand_assignment (to=0x436105a0, from=0x4367e6f0,
nontemporal=0 '\0') at ../../gcc-4.3-20070727/gcc/expr.c:4308
#9 0x0021afc8 in expand_expr_real_1 (exp=0x4367ac20, target=0x436105a0,
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0) at
../../gcc-4.3-20070727/gcc/expr.c:8921
#10 0x0022c450 in expand_expr_real (exp=0x4367ac20, target=0x4360dbb0,
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0) at
../../gcc-4.3-20070727/gcc/expr.c:6896
#11 0x004b1488 in expand_expr_stmt (exp=0x4367ac20) at
../../gcc-4.3-20070727/gcc/expr.h:503
#12 0x004e57c8 in expand_gimple_basic_block (bb=0x424f8640) at
../../gcc-4.3-20070727/gcc/cfgexpand.c:1614
#13 0x004e69dc in tree_expand_cfg () at
../../gcc-4.3-20070727/gcc/cfgexpand.c:1921
#14 0x00291b90 in execute_one_pass (pass=0x80cd00) at
../../gcc-4.3-20070727/gcc/passes.c:1124
#15 0x00291db0 in execute_pass_list (pass=0x80cd00) at
../../gcc-4.3-20070727/gcc/passes.c:1177
#16 0x002ee27c in tree_rest_of_compilation (fndecl=0x43679380) at
../../gcc-4.3-20070727/gcc/tree-optimize.c:405
#17 0x001a02c4 in cgraph_expand_function (node=0x4360b700) at
../../gcc-4.3-20070727/gcc/cgraphunit.c:1072
#18 0x001a1900 in cgraph_assemble_pending_functions () at
../../gcc-4.3-20070727/gcc/cgraphunit.c:435
#19 0x001a1ddc in cgraph_finalize_function (decl=0x43679380, nested=0 '\0') at
../../gcc-4.3-20070727/gcc/cgraphunit.c:552
#20 0x00094998 in gfc_generate_function_code (ns=0x4367a6e0) at
../../gcc-4.3-20070727/gcc/fortran/trans-decl.c:3407
#21 0x00050a8c in gfc_parse_file () at
../../gcc-4.3-20070727/gcc/fortran/parse.c:3287
#22 0x000774a4 in gfc_be_parse_file (set_yydebug=7310268) at
../../gcc-4.3-20070727/gcc/fortran/f95-lang.c:301
#23 0x0011cefc in toplev_main (argc=8365508, argv=0x43106480) at
../../gcc-4.3-20070727/gcc/toplev.c:1043
#24 0x00002330 in _start ()
#25 0x00002034 in start ()
This PR seems to affect the following test (same result under gdb, see
PR32770#16):
gfortran.dg/associated_2_db
gfortran.dg/bounds_check_5.f90
gfortran.dg/der_array_1.f90
gfortran.dg/ret_pointer_1.f90
I greped the gfortran.dg directory for 'associated' and found some tests that
pass, for instance:
gfortran.dg/pointer_intent_1.f90
gfortran.dg/result_default_init_1.f90
--
Summary: char_associated_1_red.f90 gives an ICE with -fdefault-
integer-8
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32943